Run specs on multiple browsers

This commit is contained in:
Greg Cobb and JR Boyens
2013-07-18 16:32:33 -07:00
parent 0f803430e4
commit 6569176cc9
3 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -2,7 +2,8 @@
# - "sh -e /etc/init.d/xvfb start" # - "sh -e /etc/init.d/xvfb start"
before_install: before_install:
- "export DISPLAY=:99.0" - "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"# - "sh -e /etc/init.d/xvfb start"
- "sh -e travis-chromium-script.sh"
script: "DISPLAY=:99.0 bundle exec rake core_spec" script: "DISPLAY=:99.0 bundle exec rake core_spec"
rvm: rvm:
@@ -11,5 +12,4 @@ rvm:
env: env:
- JASMINE_BROWSER=firefox - JASMINE_BROWSER=firefox
- JASMINE_BROWSER=chrome - JASMINE_BROWSER=chrome
- JASMINE_BROWSER=safari
- JASMINE_BROWSER=phantomjs - JASMINE_BROWSER=phantomjs
+1 -1
View File
@@ -5,7 +5,7 @@ require 'jasmine'
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml')) Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
config = Jasmine.config config = Jasmine.config
Jasmine.configure do |config| Jasmine.configure do |config|
config.browser = ENV.fetch('JASMINE_BROWSER', 'firefox') config.browser = ENV['JASMINE_BROWSER'] || 'firefox'
end end
server = Jasmine::Server.new(config.port, Jasmine::Application.app(config)) server = Jasmine::Server.new(config.port, Jasmine::Application.app(config))
driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/") driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/")
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash -e
sudo apt-get update
sudo apt-get install chromium-browser
wget https://chromedriver.googlecode.com/files/chromedriver_linux64_2.1.zip
unzip chromedriver_linux64_2.1.zip
sudo mv chromedriver /usr/local/bin/