I don't know if this is a cucumber question, an rspec question, or a bundler /
ruby question.
I promise, this use to work. This is a Rails 3.2.8 project.
In spec/support/asset_examples_group.rb I have:
module RSpec::Rails
module AssetExampleGroup
extend ActiveSupport::Concern
include RSpec::Rails::RailsExampleGroup
include Capybara::DSL
include Capybara::RSpecMatchers
included do
metadata[:type] = :asset
end
end
end
I also have:
config.include RSpec::Rails::AssetExampleGroup, :type => :asset,
:example_group => {
:file_path => config.escaped_path(%w[spec assets])
}
in my spec_helper.rb file.
rspec works fine and is happy. But when I try to run cucumber, I get:
cucumber user_swinfo_request.feature
Using the default profile...
Rack::File headers parameter replaces cache_control after Rack 1.5.
uninitialized constant RSpec::Rails::RailsExampleGroup (NameError)
/Users/pedzan/Source/Rails3/condor3/spec/support/asset_example_group.rb:4:in
`<module:AssetExampleGroup>'
/Users/pedzan/Source/Rails3/condor3/spec/support/asset_example_group.rb:2:in
`<module:Rails>'
/Users/pedzan/Source/Rails3/condor3/spec/support/asset_example_group.rb:1:in
`<top (required)>'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/rb_support/rb_language.rb:129:in
`load_code_file'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/runtime/support_code.rb:171:in
`load_file'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/runtime/support_code.rb:83:in
`block in load_files!'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/runtime/support_code.rb:82:in
`each'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/runtime/support_code.rb:82:in
`load_files!'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/runtime.rb:175:in
`load_step_definitions'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/runtime.rb:40:in
`run!'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:43:in
`execute!'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:20:in
`execute'
/Users/pedzan/Source/Rails3/condor3/.bundle/gems/ruby/1.9.1/gems/cucumber-1.2.1/bin/cucumber:14:in
`<top (required)>'
/Users/pedzan/Source/Rails3/condor3/.bundle/bin/cucumber:16:in `load'
/Users/pedzan/Source/Rails3/condor3/.bundle/bin/cucumber:16:in `<main>'
I've backed up in my git repository a month and a half and I still get the same
error. I have not changed my ruby. I'm sure I've changed some other
environment setting but I can't figure out what it might be.
But... aside from that, I can't figure out why RailsExampleGroup is not
defined... I'm using bundler so, in theory, I should be loading the same gems
as I was a month and a half ago.
Two questions:
Any ideas of what changed?
Any help in fixing the problem? (I'm curious about both)
As I said, this may not be the best mailing list but I had a feeling someone in
this list would know.
Thank you,
Perry
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.