我想做一些类似以下的事情:
require 'rspec-expectations'
"bat".length.should eq(3)
# => NoMethodError: undefined method `eq' for main:Object这样的事情有可能发生吗?我需要如何更改它?我是否需要'rspec-expectations'
发布于 2013-04-29 00:13:28
在irb中:
require 'rspec-expectations'
include RSpec::Matchers
"bat".length.should eq(3)发布于 2013-04-29 00:10:31
gem install interactive_rspec然后
irspec
001> "bat".length.should eq(3)
.
Finished in 0.00006 seconds
1 example, 0 failures
=> truehttps://stackoverflow.com/questions/16264791
复制相似问题