Sha256: 0f3c8528cba9fc983f0f05640f91117c27830ca97986e019d8ebc35bf316ad26

Contents?: true

Size: 607 Bytes

Versions: 2

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

require 'capybara-screenshot/rspec'

::Capybara::Screenshot.autosave_on_failure = true
::Capybara::Screenshot.prune_strategy      = :keep_last_run

::Capybara::Screenshot::RSpec.add_link_to_screenshot_for_failed_examples = false

::Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
  example.full_description.downcase.tr(' ', '-').gsub(%r{^.*/spec/}, '')
end

%i{chrome headless_chrome firefox headless_firefox}.each do |browser|
  ::Capybara::Screenshot.register_driver(browser) do |driver, path|
    driver.browser.save_screenshot(path)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspeckled-2.1.1 lib/rspeckled/plugins/configuration/capybara_screenshot.rb
rspeckled-2.1.0 lib/rspeckled/plugins/configuration/capybara_screenshot.rb