rspec-rails-examples icon indicating copy to clipboard operation
rspec-rails-examples copied to clipboard

Regenerate rspec helper files

Open leesmith opened this issue 9 years ago • 1 comments

So all I did was rails g rspec:install to regenerate the two helper files. I let it overwrite what we had and then I went through and enabled the options we were using.

I also had to make a small syntax correction in all of the feature specs. I'm not sure what in the config changed that. Here's the error I was getting:

/Users/lsmith/src/github.com/leesmith/rspec-rails-examples/spec/features/home_page_spec.rb:3:in `<top (required)>': undefined method `feature' for main:Object (NoMethodError)
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `block in load'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `block in load_spec_files'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `each'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `load_spec_files'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:102:in `setup'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:88:in `run'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in `run'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke'
    from /Users/lsmith/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/exe/rspec:4:in `<main>'

leesmith avatar Aug 08 '15 18:08 leesmith

Figured it out...could have used RSpec.feature instead of RSpec.describe. Use whichever you prefer.

leesmith avatar Aug 08 '15 18:08 leesmith