spec/spec_helper.rb in solidus_culqi-0.1.1 vs spec/spec_helper.rb in solidus_culqi-1.0.0

- old
+ new

@@ -18,29 +18,12 @@ require File.expand_path('dummy/config/environment.rb', __dir__) require 'rspec/rails' require 'database_cleaner' require 'ffaker' -require 'vcr' -require 'webmock' -require 'capybara/rspec' -require 'selenium-webdriver' require 'pry' -Capybara.register_driver :geckodriver do |app| - ::Selenium::WebDriver::Firefox.driver_path = ENV['DRIVER_PATH'] - options = ::Selenium::WebDriver::Firefox::Options.new - options.args << '--headless' - - Capybara::Selenium::Driver.new(app, - browser: :firefox, - options: options) -end - -Capybara.javascript_driver = :geckodriver -Capybara.default_max_wait_time = 30 - # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f } # Requires factories and other useful helpers defined in spree_core. @@ -54,12 +37,10 @@ # Requires factories defined in lib/solidus_culqi/factories.rb require 'solidus_culqi/factories' RSpec.configure do |config| config.include FactoryBot::Syntax::Methods - config.include CulqiHelper - config.include Spree::TestingSupport::UrlHelpers config.include Spree::TestingSupport::Preferences # Infer an example group's spec type from the file location. config.infer_spec_type_from_file_location! @@ -89,30 +70,15 @@ # Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary. config.before :each do DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction DatabaseCleaner.start - reset_spree_preferences end # After each spec clean the database. config.after :each do DatabaseCleaner.clean end config.fail_fast = ENV['FAIL_FAST'] || false config.order = 'random' - - if SolidusCulqi::Support.solidus_earlier('2.3.x') - config.filter_run_excluding new_gateway: true - else - config.filter_run_excluding old_gateway: true - end -end - -VCR.configure do |c| - c.cassette_library_dir = "spec/cassettes" - c.hook_into :webmock - c.ignore_localhost = true - c.configure_rspec_metadata! - c.default_cassette_options = { re_record_interval: 7.days } end