spec/spec_helper.rb in blacklight_cql-1.2.1 vs spec/spec_helper.rb in blacklight_cql-2.0.0

- old
+ new

@@ -5,15 +5,14 @@ Bundler.require :default, :development # Set the default environment to sqlite3's in_memory database ENV['RAILS_ENV'] ||= 'test' +EngineCart.load_application! -require 'blacklight/engine' -Combustion.initialize! - require 'rspec/rails' +require 'rspec/autorun' require 'capybara/rspec' require 'capybara/rails' # Requires supporting ruby files with custom matchers and macros, etc, @@ -23,12 +22,13 @@ MARC_DATA_PATH = "#{File.dirname(__FILE__)}/marc_data" # Undo changes to RAILS_ENV silence_warnings {RAILS_ENV = ENV['RAILS_ENV']} -# Run the migrations -ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate") +# Checks for pending migrations before tests are run. +# If you are not using ActiveRecord, you can remove this line. +ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration) RSpec.configure do |config| # == Mock Framework # @@ -38,20 +38,16 @@ # config.mock_with :flexmock # config.mock_with :rr config.mock_with :rspec # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = "#{File.expand_path(File.dirname(__FILE__))}/spec/fixtures" + #config.fixture_path = "#{::Rails.root}/spec/fixtures" # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false # instead of true. - config.use_transactional_fixtures = true + #config.use_transactional_fixtures = true - # If true, the base class of anonymous controllers will be inferred - # automatically. This will be the default behavior in future versions of - # rspec-rails. - config.infer_base_class_for_anonymous_controllers = false ## # Load CqlRuby and our local patches to it, so available for tests #