Skip to content

Failing when preloading #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
onemanstartup opened this issue Jun 2, 2016 · 6 comments
Closed

Failing when preloading #1

onemanstartup opened this issue Jun 2, 2016 · 6 comments

Comments

@onemanstartup
Copy link

~Code/Experiment/oneman/spec/support/capybara.rb:5:in included': uninitialized constant RSpec::Hanami::Container (NameError)`

Hanami head version.

@davydovanton
Copy link
Owner

Hello, thanks for reporting 👍
Could you provide more information about this problem?

@onemanstartup
Copy link
Author

Failed here basically

  config.include RSpec::FeatureExampleGroup

Log

/Users/onemanstartup/Code/Experiment/oneman/spec/support/capybara.rb:5:in `included': uninitialized constant RSpec::Hanami::Container (NameError)
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1312:in `include'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1312:in `safe_include'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1261:in `block in configure_existing_groups'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1259:in `each'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1259:in `configure_existing_groups'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1161:in `include'
    from /Users/onemanstartup/Code/Experiment/oneman/spec/features_helper.rb:8:in `block in <top (required)>'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core.rb:97:in `configure'
    from /Users/onemanstartup/Code/Experiment/oneman/spec/features_helper.rb:7:in `<top (required)>'
    from /Users/onemanstartup/Code/Experiment/oneman/spec/web/features/visit_home_spec.rb:1:in `require'
    from /Users/onemanstartup/Code/Experiment/oneman/spec/web/features/visit_home_spec.rb:1:in `<top (required)>'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `load'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `each'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:106:in `setup'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
    from /Users/onemanstartup/Code/Experiment/oneman/.gem/ruby/2.3.0/gems/rspec-core-3.4.4/exe/rspec:4:in `<main>'

@lightalloy
Copy link

I also ran into this problem. Had to change

Capybara.app = Hanami::Container.new

to

Capybara.app = ::Hanami::Container.new

in spec/support/capybara.rb, so it worked.

@blewa
Copy link

blewa commented Dec 11, 2016

lightalloy's fix also works for the ::hanami::App.new case.

@davydovanton
Copy link
Owner

I updated installation information for this case. Thanks everyone 🎉

@augustoc100
Copy link

Hanami.app it works too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants