Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updating build system to get ready to introduce remote testing

  • Loading branch information...
commit 588e8b3b776d6e3aa06ce83f079f0900aa7dc6ed 1 parent 0f63747
@cheezy authored
View
4 Rakefile
@@ -14,11 +14,11 @@ task :spec
namespace :features do
Cucumber::Rake::Task.new(:watir_webdriver, "Run features with Watir") do |t|
- t.profile = "watir"
+ t.profile = "watir_webdriver"
end
Cucumber::Rake::Task.new(:selenium_webdriver, "Run features with Selenium") do |t|
- t.profile = "selenium"
+ t.profile = "selenium_webdriver"
end
desc 'Run all features'
View
8 cucumber.yml
@@ -1,10 +1,10 @@
<%
-std_opts = "BROWSER=firefox --no-source --color --format Cucumber::Formatter::Fuubar"
+std_opts = "--no-source --color --format Cucumber::Formatter::Fuubar"
%>
default: DRIVER=WATIR <%= std_opts %> --tags ~@selenium_only
-watir: DRIVER=WATIR <%= std_opts %> --tags ~@selenium_only
-selenium: DRIVER=SELENIUM <%= std_opts %> --tags ~@watir_only
-focus: DRIVER=WATIR <%= std_opts %> --tags ~@selenium_only --tags @focus
+watir_webdriver: DRIVER=WATIR <%= std_opts %> --tags ~@selenium_only
+selenium_webdriver: DRIVER=SELENIUM <%= std_opts %> --tags ~@watir_only
+focus: DRIVER=WATIR <%= std_opts %> --tags ~@selenium_only --tags @focus
#focus: DRIVER=SELENIUM <%= std_opts %> --tags ~@watir_only --tags @focus
View
11 features/support/persistent_browser.rb
@@ -4,9 +4,14 @@ module PersistantBrowser
@@browser = false
def self.get_browser
if !@@browser
- target_browser = ENV['BROWSER'].to_sym
- @@browser = Watir::Browser.new target_browser if ENV['DRIVER'] == 'WATIR'
- @@browser = Selenium::WebDriver.for target_browser if ENV['DRIVER'] == 'SELENIUM'
+ target = ENV['BROWSER']
+ target = 'firefox_local' unless target
+
+ require_relative "targets/#{target}"
+ extend Target
+
+ @@browser = watir_browser if ENV['DRIVER'] == 'WATIR'
+ @@browser = selenium_browser if ENV['DRIVER'] == 'SELENIUM'
end
@@browser
end
View
9 features/support/targets/firefox_local.rb
@@ -0,0 +1,9 @@
+module Target
+ def watir_browser
+ Watir::Browser.new :firefox
+ end
+
+ def selenium_browser
+ Selenium::WebDriver.for :firefox
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.