Sha256: a910ce05e3be28e469570aaa4dedd0bd7a2c02a4273df181c34ec0bceaa69b91

Contents?: true

Size: 516 Bytes

Versions: 6

Compression:

Stored size: 516 Bytes

Contents

require 'capybara'
require 'capybara/dsl'

RSpec.configure do |config|
  config.include Capybara, :type => :acceptance
  config.after do
    if example.metadata[:type] == :acceptance
      Capybara.reset_sessions!
      Capybara.use_default_driver
    end
  end
  config.before do
    if example.metadata[:type] == :acceptance
      Capybara.current_driver = Capybara.javascript_driver if example.metadata[:js]
      Capybara.current_driver = example.metadata[:driver] if example.metadata[:driver]
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
capybara-0.4.1.2 lib/capybara/rspec.rb
capybara-rails-2-2-0.4.1.1 lib/capybara/rspec.rb
rcarvalho-capybara-0.4.1.2 lib/capybara/rspec.rb
rcarvalho-capybara-0.4.1.1 lib/capybara/rspec.rb
capybara-0.4.1.1 lib/capybara/rspec.rb
capybara-0.4.1.rc lib/capybara/rspec.rb