shoulda-matchers: Rails 5.0.0, Get `undefined method `configure' for Shoulda::Matchers:Module' error.

Rails 5.0.0, config with following process:

  1. Add following config to Gemfile
group :test do
  gem 'shoulda', '~> 3.5'
  gem 'shoulda-matchers'
end
  1. run bundle install
  2. Add following code to test/test_helper
Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    with.test_framework :minitest
    with.library :rails
  end
end
  1. Run rake test. Got
rake aborted!
NoMethodError: undefined method `configure' for Shoulda::Matchers:Module
/home/zw963/Xthink/ershou_web/test/test_helper.rb:20:in `<top (required)>'

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 5
  • Comments: 30

Most upvoted comments

@delacruzjames Yeah, that’s what I would have recommended. 😃 Glad that worked for you!