spec/spec_helper.rb in authenticate-0.3.2 vs spec/spec_helper.rb in authenticate-0.3.3
- old
+ new
@@ -18,9 +18,16 @@
# Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
# Load factory girl factories.
Dir[File.join(File.dirname(__FILE__), 'factories/**/*.rb')].each { |f| require f }
+# Build test database in spec/dummy/db/
+if defined?(ActiveRecord::Migration.maintain_test_schema!)
+ ActiveRecord::Migration.maintain_test_schema! # rails 4.1+
+else
+ ActiveRecord::Migration.check_pending! # rails 4.0
+end
+
RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
config.infer_spec_type_from_file_location!
config.order = :random
config.use_transactional_fixtures = true