diff options
author | jessib <jessib@riseup.net> | 2013-07-16 12:49:48 -0700 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-07-16 12:49:48 -0700 |
commit | 97bd0ba4b35481216b2a1592065c70562c81c2d5 (patch) | |
tree | 036760e5427bbb32360cf9eb3ccbe80159d62695 /test | |
parent | bf5922d26e27ee9695b07eade42d36a34b63fc4e (diff) | |
parent | 8486248a7a960bc75f25f2c5a00791416f124ac4 (diff) |
Merge pull request #60 from azul/bugfix/srp-fix-for-zeroprefixed-hashes
Bugfix/srp fix for zeroprefixed hashes
Diffstat (limited to 'test')
-rw-r--r-- | test/test_helper.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 0016771..26b99f4 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -10,3 +10,35 @@ Dir["#{File.dirname(__FILE__)}/../*/test/support/**/*.rb"].each { |f| require f class ActiveSupport::TestCase # Add more helper methods to be used by all tests here... end + +require 'capybara/poltergeist' + +CONFIG_RU = (Rails.root + 'config.ru').to_s +OUTER_APP = Rack::Builder.parse_file(CONFIG_RU).first + +Capybara.register_driver :rack_test do |app| + Capybara::RackTest::Driver.new(app) +end + +Capybara.register_driver :poltergeist do |app| + Capybara::Poltergeist::Driver.new(app) +end + +# this is integration testing. So let's make the whole +# rack stack available... +Capybara.app = OUTER_APP +Capybara.run_server = true +Capybara.app_host = 'http://lvh.me:3003' +Capybara.server_port = 3003 +Capybara.javascript_driver = :poltergeist +Capybara.default_wait_time = 5 + +class BrowserIntegrationTest < ActionDispatch::IntegrationTest + # Make the Capybara DSL available + include Capybara::DSL + + teardown do + Capybara.reset_sessions! # Forget the (simulated) browser state + Capybara.use_default_driver # Revert Capybara.current_driver to Capybara.default_driver + end +end |