How it works
In your Rails 3.1 app, just add it to your Gemfile, like this:
Then create a manifest file named
requires all of your test code for its respective suite, including
any custom helpers.
TestTrack automatically adds test paths to your app's asset pipeline. The default locations are...
- Jasmine -
- Qunit -
We would recommend that you place your test manifests in these directories and will look for them there by default. Feel free to place these anywhere else in the asset pipeline, just don't forget to specify its location in an initializer. If it happens to be in the root of an asset directory, no additional configuration is required.
If you'd like to change a default, such as the name of your Jasmine
manifest, try the following in
TestTrack.setup do |config| config.qunit_manifest = "test/qunit" end
To see this in action, check out the sample Rails code in
lib/test_track.rb for all available options.
Finally, just mount the TestTrack engine in routes.rb.
mount TestTrack::Engine => "test"
And you're off the the races. An index is provide with links to the test
runners. They would be accessible at
/test/qunit in the example above.
Obviously, you may not want to have these routes available if your app
is running in
:production. Give this a try!
mount TestTrack::Engine => "test" unless Rails.env.production?
This project uses the MIT-LICENSE.