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

View File

@@ -2,7 +2,8 @@
# - "sh -e /etc/init.d/xvfb start"
before_install:
- "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"
rvm:
@@ -11,5 +12,4 @@ rvm:
env:
- JASMINE_BROWSER=firefox
- JASMINE_BROWSER=chrome
- JASMINE_BROWSER=safari
- JASMINE_BROWSER=phantomjs

View File

@@ -5,7 +5,7 @@ require 'jasmine'
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
config = Jasmine.config
Jasmine.configure do |config|
config.browser = ENV.fetch('JASMINE_BROWSER', 'firefox')
config.browser = ENV['JASMINE_BROWSER'] || 'firefox'
end
server = Jasmine::Server.new(config.port, Jasmine::Application.app(config))
driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/")

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/