spec/rails_helper.rb in enju_grid-0.2.0 vs spec/rails_helper.rb in enju_grid-0.3.0.beta.1
- old
+ new
@@ -9,12 +9,11 @@
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'spec_helper'
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
-require 'factory_girl'
-require 'sunspot-rails-tester'
+require 'factory_bot'
require 'pundit/rspec'
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
@@ -57,21 +56,10 @@
#
# The different available types are documented in the features, such as in
# https://relishapp.com/rspec/rspec-rails/docs
config.infer_spec_type_from_file_location!
- config.extend ControllerMacros, :type => :controller
-
- 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.extend ControllerMacros, type: :controller
end
-FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories"
-FactoryGirl.find_definitions
-
+FactoryBot.definition_file_paths << "#{::Rails.root}/../../spec/factories"
+FactoryBot.find_definitions