Sha256: 49dc1b0eccc4594a9e95083c4415c60f164ba330484eb209c73bb82ad518abf8

Contents?: true

Size: 571 Bytes

Versions: 2

Compression:

Stored size: 571 Bytes

Contents

require 'capybara/poltergeist'

# Allow individual cucumber scenarios to work with Poltergeist instead of selenium
Around('@poltergeist') do |scenario, block|
  @capy_def_driver = Capybara.default_driver
  @capy_js_driver = Capybara.javascript_driver
  # Just for this scenario, let's go Poltergeist
  Capybara.default_driver = :poltergeist
  Capybara.javascript_driver = :poltergeist
  block.call
    # Reset it back to the original
  Capybara.default_driver = @capy_def_driver # Usually :rack_test
  Capybara.javascript_driver = @capy_js_driver # Usually :selenium
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tsuite-0.1.6 lib/generators/tsuite/templates/features/support/poltergeist.rb
tsuite-0.1.5 lib/generators/tsuite/templates/features/support/poltergeist.rb