pivotal/jasmine — Issue #151: Using a CoffeeScript fat arrow (=>) throws a Sprockets::CircularDependencyError in 1.2.0.rc1
Author: Axsuul
Created: 2011-10-25 09:01:27+00:00
State: open

If I define a function in one of my src files `foobar.js.coffee` using CoffeeScript as such

```coffeescript
# global namespace
root = exports ? this

class root.Foobar
test = "Hello World!"

test: =>
alert(@test)
```

and then I view the source of the Jasmine suite of the compiled `foobar.js` file, it shows

```javascript
throw Error("Sprockets::CircularDependencyError: .../foobar.js.coffee has already been required")
```

However, changing back to a skinny arrow and restarting jasmine seems to fix the problem.

```coffeescript
# global namespace
root = exports ? this

class root.Foobar
test = "Hello World!"

test: ->
alert(@test)
```