I am working on my first Ruby gem and have cucumber, rspec and matches for testing. When I run rspec, I get the following error:
/app/my_gem/spec/spec_helper.rb:6:in `<top (required)>': undefined method `configure' for Shoulda::Matchers:Module (NoMethodError)
Here is my gemspec:
# my_gem.gemspec ... Gem::Specification.new do |spec| ... ... spec.add_development_dependency "activemodel" spec.add_development_dependency "bundler", "~> 1.8" spec.add_development_dependency "cucumber" spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "rspec" spec.add_development_dependency "shoulda-matchers" end
My spec_helper.rb :
require 'my_gem' require 'pry' require 'shoulda/matchers' Shoulda::Matchers.configure do |config| config.integrate do |with| with.test_framework :rspec
For some reason, a search for the Shoulda :: Matchers method, but not the .configure method. I demand that shoulda wrong somehow? Not sure if this is related, but rspec also gives me this warning:
WARN: Unresolved specs during Gem::Specification.reset: json (>= 1.7.7, ~> 1.7) minitest (~> 5.1) WARN: Clearing out unresolved specs. Please report a bug if this causes problems.
Thanks for any pointers!
source share