I'm trying to follow the instructions here to install Capybara. But each time I try to run the integration test, I get:
/Users/rambo/.rvm/gems/ruby-1.9.2-p180/bundler/gems/capybara-6641fddcfc33/lib/capybara/rails.rb:4:in `<top (required)>': uninitialized constant Object::Rack (NameError)
from /Users/rambo/Code/ror/witsvale_app/test/integration_test_helper.rb:1:in `require'
from /Users/rambo/Code/ror/witsvale_app/test/integration_test_helper.rb:1:in `<top 开发者_Python百科(required)>'
from test/integration/capy_test.rb:1:in `require'
from test/integration/capy_test.rb:1:in `<top (required)>'
from /Users/rambo/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
The line that is causing the problem is require capybara/rails
.
Any ideas will be greatly appreciated.
I feel like a dum dum.
Anyway, I've solved it. Turns out I was missing 'test_helper.rb' in the 'test' folder. After including that, it works!
精彩评论