Skip to content

Commit

Permalink
Merge pull request #8 from dnagir/patch-1
Browse files Browse the repository at this point in the history
Update README with quicker setup instructions for Rails 3.1
  • Loading branch information
netzpirat committed Nov 5, 2011
2 parents dd7565f + cf9a575 commit d06b1c4
Showing 1 changed file with 11 additions and 7 deletions.
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

0 comments on commit d06b1c4

Please sign in to comment.