undefined method `validate_presence_of'

https://github.com/thoughtbot/shoulda-matchers

 

加了gem 'shoulda-matchers', '~> 3.0',

报错是因为没有配置spec/rails_helper.rb,详细内容在上面连接里的configuration里

Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    # Choose a test framework:
    with.test_framework :rspec
    with.library :rails
  end 
end

 

posted @ 2015-10-21 18:51  冰凌花花~  阅读(225)  评论(0编辑  收藏  举报