A Ruby project (with or without Rails)

David Tengdin edited this page Jul 19, 2013 · 2 revisions

Using Jasmine in a Ruby Web Project

For Rails 3 Projects

Add Jasmine to your Gemfile:

gem "jasmine"

Then update your gems, add example specs to your project, and run them:

$ bundle install
$ bundle exec rails generate jasmine:install
$ jasmine init

Better Rails 3/RSpec 2 support is on master, but has not yet been released.

For Rails 2 Projects

Install the Jasmine gem, add example specs to your project, and run them:

$ gem install jasmine
$ script/generate jasmine
$ rake spec

For Ruby projects (without Rails)

If you are working on a Ruby web project, or any other web project where Ruby is welcome and available, the Jasmine Ruby gem provides a small server and a configuration scheme so that your source and spec files are loaded automatically.

$ gem install jasmine
$ jasmine init
$ rake jasmine:ci

If your Ruby project is using Bundler, feel free to add

gem 'jasmine'

to your Gemfile.

Find out more at Using the Jasmine Gem