Skip to content

Instantly share code, notes, and snippets.

@swombat swombat/gist:670560
Created Nov 10, 2010

Embed
What would you like to do?
`killall -9 firefox-bin`
DatabaseCleaner.strategy = :truncation, {:except => %w[ price_points ]}
Spec::Runner.configure do |config|
config.include Capybara
config.use_transactional_fixtures = false
Capybara.current_driver = :selenium
Capybara.default_selector = :css
config.before(:each) do
Capybara.reset_sessions!
DatabaseCleaner.clean
end
config.after(:each) do
end
end
# Put your acceptance spec helpers inside /spec/acceptance/support
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
class Capybara::Driver::Selenium
def browser
unless @browser
@browser = Selenium::WebDriver.for(options.delete(:browser) || :firefox, options)
at_exit do
# @browser.quit
end
end
@browser
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.