Sha256: ce4db7e786141a0d7faf440fb958011c8e66beabd425be39749a7fb441d550d8

Contents?: true

Size: 1.18 KB

Versions: 6

Compression:

Stored size: 1.18 KB

Contents

Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }

require 'pry'
require 'billy/capybara/rspec'
require 'billy/watir/rspec'
require 'rack'
require 'logger'
require 'fileutils'
require 'webdrivers'

$stdout.puts `#{::Selenium::WebDriver::Chrome::Service.driver_path.call} --version` if ENV['CI']

browser = Billy::Browsers::Watir.new :chrome

Capybara.configure do |config|
  config.app = Rack::Directory.new(File.expand_path('../../examples', __FILE__))
  config.server = :webrick
  config.javascript_driver = :selenium_chrome_headless_billy
end

Billy.configure do |config|
  config.logger = Logger.new(File.expand_path('../../log/test.log', __FILE__))
end

RSpec.configure do |config|
  include Billy::TestServer
  config.run_all_when_everything_filtered = true
  config.filter_run :focus
  config.order = 'random'

  config.before :suite do
    FileUtils.rm_rf(Billy.config.certs_path)
    FileUtils.rm_rf(Billy.config.cache_path)
  end

  config.before :all do
    start_test_servers
    @browser = browser
  end

  config.before :each do
    proxy.reset_cache
  end

  config.after :each do
    Billy.config.reset
  end

  config.after :suite do
    browser.close
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puffing-billy-3.0.0 spec/spec_helper.rb
puffing-billy-2.4.1 spec/spec_helper.rb
puffing-billy-2.4.0 spec/spec_helper.rb
puffing-billy-2.3.1 spec/spec_helper.rb
puffing-billy-2.3.0 spec/spec_helper.rb
puffing-billy-2.2.0 spec/spec_helper.rb