Ruby on rails 4 未定义的方法'allow#u value';
在gem'rails'、'4.1.0.rc2'上的gem'shoulda matchers'有问题,当我运行测试时,我得到一个错误Ruby on rails 4 未定义的方法'allow#u value';,ruby-on-rails-4,rspec-rails,Ruby On Rails 4,Rspec Rails,在gem'rails'、'4.1.0.rc2'上的gem'shoulda matchers'有问题,当我运行测试时,我得到一个错误 /Volumes/Khaya/myapp/spec/models/account_spec.rb:13:in `block (2 levels) in <top (required)>': undefined method `allow_value' for RSpec::ExampleGroups::Account_2::Validations:Cla
/Volumes/Khaya/myapp/spec/models/account_spec.rb:13:in `block (2 levels) in <top (required)>': undefined method `allow_value' for RSpec::ExampleGroups::Account_2::Validations:Class (NoMethodError)
我的测试
it {should allow_value('vezu').for(:name)}
我想不出怎么解决这个问题。我的配置中是否缺少某些内容 我的错误我犯了这样的错误
it should_not allow_value('VEZU S').for(:name)
而不是
it {should_not allow_value('VEZU S').for(:name)}
it {should_not allow_value('VEZU S').for(:name)}