lib/sim/local.rb in sim-0.0.1 vs lib/sim/local.rb in sim-0.0.2
- old
+ new
@@ -3,11 +3,27 @@
require_relative 'support/config'
require 'capybara/rails'
puts "loading local.rb"
-# Capybara local run
-Capybara.javascript_driver = :selenium
-Capybara.default_driver = :selenium
-Capybara.register_driver :selenium do |app|
- Capybara::Selenium::Driver.new(app, :browser => :chrome)
+def set_local_config()
+ # Capybara local run
+ Capybara.javascript_driver = :selenium
+ Capybara.default_driver = :selenium
+ Capybara.register_driver :selenium do |app|
+ Capybara::Selenium::Driver.new(app, :browser => :chrome)
+ end
+end
+
+if is_rspec()
+ RSpec.configure do |config|
+ config.before(:all) do
+ set_local_config()
+ end
+ end
+end
+
+if is_cucumber()
+ AfterConfiguration do |config|
+ set_local_config()
+ end
end
\ No newline at end of file