Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README with quicker setup instructions for Rails 3.1 #8

Merged
merged 3 commits into from
Nov 5, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,25 @@ group :development, :test do
end
```

and add a route for the Jasmine Test Runner to `config/routes.rb`:

```ruby
if ["development", "test"].include? Rails.env
mount Jasminerice::Engine => "/jasmine"
end
And run following from the Terminal:
```bash
mkdir -p spec/javascripts
echo -e "#=require application\n#=require_tree ./" > spec/javascripts/spec.js.coffee
echo -e "/*\n * add css using =require application\n */" > spec/javascripts/spec.css
```

Next you create the directory `spec/javascripts` where your CoffeeScript tests go into. You define the Rails 3.1
This creates the directory `spec/javascripts` where your CoffeeScript tests go into. You define the Rails 3.1
asset pipeline manifest in `spec/javascripts/spec.js.coffee`:

```coffeescript
#=require application
#=require_tree ./
```

It also creates an empty `spec/javascripts/spec.css` file as it is always requested when running specs.

Now you can access `/jasmine` url when you start rails server normally.

## Rails 2 & Rails 3 setup

With Rails 2 or Rails 3 you can use [the Jasmine Gem][] to configure your Jasmine specs and server the Jasmine
Expand Down