Sha256: 4b6c268599f386ff93549f401a0fc9edbe740cb65a84ec5a06efaf6760690168

Contents?: true

Size: 664 Bytes

Versions: 11

Compression:

Stored size: 664 Bytes

Contents

# frozen_string_literal: true

require 'capybara'
require 'gurke'
require 'capybara/dsl'
require 'capybara/rspec/matchers'

Gurke.configure do |c|
  c.include Capybara::DSL, type: :feature
  c.include Capybara::RSpecMatchers, type: :feature

  c.before do
    next unless self.class.include?(Capybara::DSL)

    # if context.metadata[:js]
    #   Capybara.current_driver = Capybara.javascript_driver
    # end
    #
    # if context.metadata[:driver]
    #   Capybara.current_driver = context.metadata[:driver]
    # end
  end

  c.after do
    next unless self.class.include?(Capybara::DSL)

    Capybara.reset_sessions!
    Capybara.use_default_driver
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gurke-3.4.0 lib/gurke/capybara.rb
gurke-3.3.5 lib/gurke/capybara.rb
gurke-3.3.4 lib/gurke/capybara.rb
gurke-3.3.3 lib/gurke/capybara.rb
gurke-3.3.2 lib/gurke/capybara.rb
gurke-3.3.1 lib/gurke/capybara.rb
gurke-3.2.2 lib/gurke/capybara.rb
gurke-3.2.1 lib/gurke/capybara.rb
gurke-3.2.0 lib/gurke/capybara.rb
gurke-3.1.0 lib/gurke/capybara.rb
gurke-3.0.0 lib/gurke/capybara.rb