Sha256: ee70e8ab66b287e31453964838265e8f73aa6070a064719c94c331f7a8d4c04c

Contents?: true

Size: 1.42 KB

Versions: 5

Compression:

Stored size: 1.42 KB

Contents

ENV["RAILS_ENV"] ||= 'test'
require 'rsolr'
require 'engine_cart'
EngineCart.load_application!

require 'rspec/rails'
require 'capybara/rspec'
require 'selenium-webdriver'
require 'webdrivers'

Capybara.javascript_driver = :headless_chrome

Capybara.register_driver :headless_chrome do |app|
  Capybara::Selenium::Driver.load_selenium
  browser_options = ::Selenium::WebDriver::Chrome::Options.new.tap do |opts|
    opts.args << '--headless'
    opts.args << '--disable-gpu'
    opts.args << '--no-sandbox'
    opts.args << '--window-size=1280,1696'
  end
  Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
end

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Pathname.new(File.expand_path('support/**/*.rb', __dir__))].sort.each { |f| require f }

RSpec.configure do |config|
  # rspec-rails 3 will no longer automatically infer an example group's spec type
  # from the file location. You can explicitly opt-in to the feature using this
  # config option.
  # To explicitly tag specs without using automatic inference, set the `:type`
  # metadata manually:
  #
  #     describe ThingsController, :type => :controller do
  #       # Equivalent to being in spec/controllers
  #     end
  config.infer_spec_type_from_file_location!

  config.include PresenterTestHelpers, type: :presenter
  config.include ViewComponent::TestHelpers, type: :component
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight_range_limit-8.3.0 spec/spec_helper.rb
blacklight_range_limit-8.2.3 spec/spec_helper.rb
blacklight_range_limit-8.2.2 spec/spec_helper.rb
blacklight_range_limit-8.2.1 spec/spec_helper.rb
blacklight_range_limit-8.2.0 spec/spec_helper.rb