spec/rails_helper.rb in enju_oai-0.2.0 vs spec/rails_helper.rb in enju_oai-0.3.0.beta.1

- old
+ new

@@ -5,12 +5,11 @@ # This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../dummy/config/environment", __FILE__) require 'rspec/rails' -require 'factory_girl' -require 'sunspot-rails-tester' +require 'factory_bot' require 'vcr' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } @@ -35,28 +34,16 @@ # 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 - config.extend ControllerMacros, :type => :controller + config.extend ControllerMacros, type: :controller - $original_sunspot_session = Sunspot.session - - config.before do - Sunspot.session = Sunspot::Rails::StubSessionProxy.new($original_sunspot_session) - end - - config.before :each, :solr => true do - Sunspot::Rails::Tester.start_original_sunspot_session - Sunspot.session = $original_sunspot_session - Sunspot.remove_all! - end - config.infer_spec_type_from_file_location! end -FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories" -FactoryGirl.find_definitions +FactoryBot.definition_file_paths << "#{::Rails.root}/../../spec/factories" +FactoryBot.find_definitions VCR.configure do |c| c.cassette_library_dir = 'spec/cassette_library' c.hook_into :webmock c.configure_rspec_metadata!