From 6e946dbb1daf9e52f84f72ba24d7d96d28f64528 Mon Sep 17 00:00:00 2001 From: Artem Chernikov Date: Mon, 12 May 2014 13:20:28 +0200 Subject: [PATCH 1/2] Maintain schema --- spec/spec_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0df96be7..6c71f631 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,6 +18,9 @@ require 'rspec/rails' # run twice. It is recommended that you do not name files matching this glob to # end with _spec.rb. You can configure this pattern with with the --pattern # option on the command line or in ~/.rspec, .rspec or `.rspec-local`. + +ActiveRecord::Migration.maintain_test_schema! + Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } RSpec.configure do |config| From e19aef91d09b1921428c4fcda281e9c7d5bc72ec Mon Sep 17 00:00:00 2001 From: Artem Chernikov Date: Mon, 12 May 2014 14:29:15 +0200 Subject: [PATCH 2/2] Add docs back --- spec/spec_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6c71f631..bec05b48 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -19,6 +19,8 @@ require 'rspec/rails' # end with _spec.rb. You can configure this pattern with with the --pattern # option on the command line or in ~/.rspec, .rspec or `.rspec-local`. +# Checks for pending migrations before tests are run. +# If you are not using ActiveRecord, you can remove this line. ActiveRecord::Migration.maintain_test_schema! Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }