js-test-driver-rails is a thin wrapper for the JsTestDriver library: http://code.google.com/p/js-test-driver/ To take advantage of it, you should create a js_test_driver.rb file in your RAILS_ROOT/config/ directory. The file may contain following directives: # the paths are relative to the current directory, but you can use absolute paths too # this is different from the JsTestDriver which does not allow you to use absolute paths in the config file includes 'foo', 'bar', 'public/javascripts/*.js' # files to be included excludes 'public/javascripts/fail.js' # files to be excluded, useful with globbing host 'my-laptop' # the host to which the test runner will connect, by default 'localhost' port 6666 # the port to which test runner will connect, and on which the test server will start, by default 4224 browser 'firefox' # you can specify the default browsers which will be captured Note, that this is a ruby file, so the file/browser list can be generated dynamically - it's completely up to you. For example in our project we examine a list of known browsers to determine the ones installed on the developer's system, and define only those that were found. Similarly we get the list of .js files to include from our asset packaging solution. js-test-driver-rails also allows you to define HTML fixtures easily. Imagine you have a directory structure like this: RAILS_ROOT: test/ js/ fixtures/ foo/ a.html a.html Then by defining the fixtures directory in your config file: fixtures "test/js/fixtures" At runtime, your tests will have access to the contents of the fixture files: htmlFixtures.all["a"] // contents of the test/js/fixtures/a.html htmlFixtures.all["foo/a"] // contents of the test/js/fixtures/foo/a.html You can customize the namespace and fixture container name: fixtures "test/js/fixtures", :name => "html", :namespace => "myApp" By default JsTestDriver comes with a pretty simple Test::Unit like testing framework. However it supports a couple of other frameworks, including Jasmine (http://pivotal.github.com/jasmine/), which is an RSpec-like BDD framework. If you want to user Jasmine, simply add: enable_jasmine in your config file, somewhere before including your test files and you are golden:) # the fixtures will be accessible through myApp.html[""] This gem comes with some rake tasks: # start the js test driver server rake js_test_driver:start_server # capture the default (or specified) browsers rake js_test_driver:capture_browsers [BROWSERS=foo,bar,baz] # run the tests (all or the specified ones) rake js_test_driver:run_tests [TESTS=TestCase[.testMethod]] # will run the server, capture the browsers and run tests all in one command # this is mostly useful on CI, because it's much faster to run the server and capture the browsers once # and then run the tests again and again rake js_test_driver:run [TESTS=TestCase[.testMethod]] [BROWSERS=foo,bar,baz] [OUTPUT_XML=1 | OUTPUT_PATH=/some/dir] [CAPTURE_CONSOLE=1] You can add these tasks by requiring "js_test_driver/tasks"