diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-16 12:27:39 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-16 12:27:39 +0200 |
commit | ba25b2dc84cc25e66d6fa1450fee39c9bac002c5 (patch) | |
tree | cc2b2cf04eb054a5f79bd588f69fea3bd47637f5 /features/support | |
parent | ece563296bcac93ce5918a050a70a95ceba0d7f9 (diff) | |
download | gitlab-ce-ba25b2dc84cc25e66d6fa1450fee39c9bac002c5.tar.gz |
Use poltergeist instaead of capybara-webkit
Diffstat (limited to 'features/support')
-rw-r--r-- | features/support/env.rb | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/features/support/env.rb b/features/support/env.rb index 6d49c25a8ba..1a72d765197 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -11,14 +11,33 @@ end Dir["#{Rails.root}/features/steps/shared/*.rb"].each {|file| require file} +# +# Stub gitolite +# include GitoliteStub WebMock.allow_net_connect! -Capybara.javascript_driver = :webkit + +# +# JS driver +# +require 'capybara/poltergeist' +Capybara.javascript_driver = :poltergeist +Spinach.hooks.on_tag("javascript") do + ::Capybara.current_driver = ::Capybara.javascript_driver + ::Capybara.default_wait_time = 5 +end + DatabaseCleaner.strategy = :truncation -Spinach.hooks.before_scenario { DatabaseCleaner.start } -Spinach.hooks.after_scenario { DatabaseCleaner.clean } + +Spinach.hooks.before_scenario do + DatabaseCleaner.start +end + +Spinach.hooks.after_scenario do + DatabaseCleaner.clean +end Spinach.hooks.before_run do RSpec::Mocks::setup self |