Utilizing Jasmine and taking full advantage of the Rails 3.1 asset pipeline. Jasminerice removes any excuse YOU have for not testing your out of control sprawl of CoffeeScript files. This project rocks and uses the MIT-LICENSE.
See guard-jasmine for details.
This is a gem specifically for Rails 3.1. Just include it in
group :development, :test do gem "jasminerice" end
The engine is automatically mounted into your application in the development
and test environments. If you'd like to change that behavior, you can
override the array
Jasminerice.environments in an initializer.
Create a file
This pulls in all your specs from the
As well you can use the
#require dependency mechanisms in your specs to
pull dependencies. Here's an example
#= require foo #= require bar describe "Foo", -> it "it is not bar", -> v = new Foo() expect(v.bar()).toEqual(false) describe "Bar", -> it "it is not foo", -> v = new Bar() expect(v.foo()).toEqual(false)
For including stylesheets in your specs, Jasminerice uses
Use Sprockets directives to include the right css files:
/* *= require application */
Jasminerice makes files located in the
as fixture. For example, a file
%h2 Test Fixture %p Using fixtures
is made available under the URL
/jasmine/fixtures/baz. Since Jasminerice automatically
makes a patched version of jasmine-jquery
available in your specs, you can load the
baz fixture in your spec with:
Now start your server
and there are your specs.
- Brad Phelan (firstname.lastname@example.org)