Sha256: 992ae7db89a0cebf8af79d850920b4fd2064cbe95ec35c3a2a95a4760c75a55d

Contents?: true

Size: 436 Bytes

Versions: 5

Compression:

Stored size: 436 Bytes

Contents

require 'capybara/rspec'

Turnip.type = :request

RSpec.configure do |config|
  config.before do
    if self.class.include?(Capybara::DSL) and example.metadata[:turnip]
      Capybara.current_driver = Capybara.javascript_driver if example.metadata.has_key?(:javascript)
      example.metadata.each do |tag, value|
        if Capybara.drivers.has_key?(tag)
          Capybara.current_driver = tag
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
turnip-1.0.0 lib/turnip/capybara.rb
turnip-0.3.1 lib/turnip/capybara.rb
turnip-0.3.0 lib/turnip/capybara.rb
turnip-0.2.0 lib/turnip/capybara.rb
turnip-0.1.1 lib/turnip/capybara.rb