pivotal/jasmine-gem — pull request #90 by vicentemundim (2012-05-07 22:31:25+00:00)
Title: Adding support to specify a custom rack environment to serve assets with the jasmine spec server

The idea here is to be able to use Sprockets (or any rack compatible framework) to serve assets, thus being able to write source code with any of the Sprockets supported features (like writing it with CoffeeScript, ERB, etc) and having it tested with Jasmine, all this without having to use Rails.

For example, one could add a jasmine-config.rb like this:

```ruby
module Jasmine
class Config
def custom_environment
Sprockets::Environment.new do |env|
env.append_path 'public/javascripts'
end
end

def custom_environment_path
'/javascripts'
end
end
end
```

Now assets in `public/javascript` will be served by Sprockets, so you can use CoffeeScript, ERB, and all nice Sprockets features in your source code!