CSpec-Rails is a railtie for running coffeescript specs with CSpec
Fetching latest commit…
Cannot retrieve the latest commit at this time.


CSpec Rails

We are starting to get somewhere! This gem assumes that the user has install nodejs, npm and cspec. It will then provide
you with a rake task called "cspec" that runs the cspec tool like so:

cspec -jquery -include app/assets/javascripts spec/**/*_spec.coffee

Note: The **/* is expanded by Rake, not by cspec.

We still have a long way to go but this is already pretty promosing.


This is an implementation of CSpec (http://github.com/hammerdr/cspec) that runs in the context of Rails applications.

The goal is to produce something that allows me to do:

$ rake cspec


6 expectations passed, 0 failed

for the files


class Post
  addComment: (comment) ->
    @comments.push comment


describe Post ->
  it 'should add comment' ->
    post = new Post()
    comment = new Comment()
    post.addComment comment
    post.comments.length.should equal 1