Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Adapter for running Jasmine tests from a Rails project in Sauce OnDemand
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Jasmine Sauce

The jasmine-sauce gem provides the glue necessary to run your Jasmine tests across browsers in the Sauce OnDemand cloud.

Getting Started

  1. Add jasmine-sauce to your Gemfile
  2. bundle install
  3. bundle exec sauce config
  4. install jasmine for your current rails version as directed in the guard-jasmine README
  5. rails generate sauce:jasmine
  6. rake jasmine:ci:sauce

Rails 2.3

4. echo "begin; load 'sauce/jasmine/jasmine-sauce.rake'; rescue LoadError; end" >> Rakefile

Testing Multiple Browsers Concurrently

You can run tests on multiple browsers at the same time to greatly improve the speed of your suite. Here's how you do it:

In jasmine-sauce.rake (usually under lib/tasks) add the following:

Sauce.config do |config|
  config.browsers = [
    ["Windows 2003", "firefox",      "3.6."],
    ["Windows 2003", "safari",       "4."],
    ["Windows 2003", "googlechrome", ""],
    ["Windows 2003", "iexplore",     "6."],
    ["Windows 2003", "iexplore",     "7."],
    ["Windows 2003", "iexplore",     "8."],

Modify the browser strings as necessary, look here for details on what to put in there

Changing Settings

By default, jasmine-sauce will run a server on port 8080 using guard-jasmine's auto server setting. You can override these defaults to use a different port or server (such as thin).

rake jasmine:ci:sauce PORT=<PORT_NUMBER> SERVER=<SERVER_TYPE>

For details on the available server types, see the guard-jasmine server types

Something went wrong with that request. Please try again.