Reputation: 66
My sample_app\spec\requests\user_pages_spec.rb file:
require 'spec_helper'
describe "User pages" do
subject { page }
describe "signup page" do
before { visit signup_path }
it { should have_content('Sign up') }
it { should have_title(full_title('Sign up')) }
end
end
After test i get:
No DRb server is running. Running in local process instead ...
-- check_pending!()
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/migration.rb:465:in `block in method_missing': undefined method `check_pending!' for #<ActiveRecord::Migration:0x4adcf18> (NoMethodError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/migration.rb:438:in `block in say_with_time'
Upvotes: 3
Views: 888
Reputation: 133
check_pending!() it is an method for ActiveRecord::Migration in Rails 4 and while reading the Error, discovered that your current Rails version is 3.2, so this method it will not work, and if you are using Spork with RSpec you will find that Spork changed your spec/spec_helper.rb file and added few lines include this one:
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
If you want to continue your test without checking if there is any migration still running,all you have to do is to comment this line and your test will work, in case you aren't using Spork, still recommend you to open the spec/spec_helper.rb and take a look at the code.
Upvotes: 5