rspec - Capybara 2.1 Error uninitialized constant Rails (NameError) -
i upgraded capybara gem version 1 2.1.0 (latest). based on capybara readme, added following lines spec_helper.rb inside spork.prefork block
require 'capybara/rspec' require 'capybara/rails'
but, got error
/home/user_1/.rvm/gems/ruby-1.9.3-p392/gems/capybara-2.1.0/lib/capybara/rails.rb:6:in `block (2 levels) in <top (required)>': uninitialized constant rails (nameerror)
did miss in order capybara work ?
make sure require 'rspec/rails' first:
require 'rspec/rails' require 'capybara/rspec' require 'capybara/rails'
if require 'capybara/rails' first, you'll error.
Comments
Post a Comment