Sha256: 85e4020be3f3072586fd64004efa4de8430a30ad30249e2b328af1a856a6a6bb

Contents?: true

Size: 1.07 KB

Versions: 14

Compression:

Stored size: 1.07 KB

Contents

require_relative "db_spec_helper"

require "rack/test"
require "capybara/rspec"
require "capybara-screenshot/rspec"
require "capybara/poltergeist"

Dir[SPEC_ROOT.join("support/web/*.rb").to_s].each(&method(:require))
Dir[SPEC_ROOT.join("shared/web/*.rb").to_s].each(&method(:require))

require SPEC_ROOT.join("../system/boot").realpath

Capybara.app = Test::WebHelpers.app
Capybara.server_port = 3001
Capybara.save_path = "#{File.dirname(__FILE__)}/../tmp/capybara-screenshot"
Capybara.javascript_driver = :poltergeist
Capybara::Screenshot.prune_strategy = {keep: 10}

Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new(
    app,
    js_errors: false,
    phantomjs_logger: File.open(SPEC_ROOT.join("../log/phantomjs.log"), "w"),
    phantomjs_options: %w(--load-images=no),
    window_size: [1600, 768],
  )
end

RSpec.configure do |config|
  config.include Rack::Test::Methods, type: :request
  config.include Rack::Test::Methods, Capybara::DSL, type: :feature
  config.include Test::WebHelpers

  config.before :suite do
    Test::WebHelpers.app.freeze
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
dry-web-roda-0.14.0 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-web_pipe-0.2.0 lib/dry/web/web_pipe/templates/spec/web_spec_helper.rb
dry-web-roda-0.13.1 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.13.0 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-web_pipe-0.1.0 lib/dry/web/web_pipe/templates/spec/web_spec_helper.rb
dry-web-roda-0.12.0 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.11.0 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.10.0 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.9.1 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.9.0 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.8.0 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.7.5 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.7.4 lib/dry/web/roda/templates/spec/web_spec_helper.rb
dry-web-roda-0.7.3 lib/dry/web/roda/templates/spec/web_spec_helper.rb