Created
May 13, 2013 18:22
-
-
Save tonycoco/5570302 to your computer and use it in GitHub Desktop.
sauce.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sauce' | |
require 'capybara' | |
require 'capybara/rails' | |
require 'capybara/sauce' | |
class ActionDispatch::IntegrationTest | |
include Rails.application.routes.url_helpers # for x_path and x_url helpers | |
include Capybara::DSL | |
def require_js | |
Capybara.current_driver = :sauce | |
end | |
def teardown | |
super | |
Capybara.current_driver = nil | |
end | |
end | |
Sauce.config do |config| | |
# config[:start_tunnel] = true | |
# start_tunnel_for_parallel_tests(config) | |
config[:browsers] = [["Windows 7", "Internet Explorer", "9"]] | |
end | |
DatabaseCleaner.strategy = :transaction | |
class MiniTest::Spec | |
before :each do | |
DatabaseCleaner.start | |
end | |
after :each do | |
DatabaseCleaner.clean | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment