This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo
- Install Gems with Bundler with
bundle install
- Define your guards with
mate Guardfile
- Initialize Jasmine with
bundle exec jasmine init
- Configure Jasmine with
mate spec/support/yasmine.ym
- Start Guard with
bundle exec guard
- Start Jasmine with
bundle exec rake jasmine
- Open your browser with
open http://localhost:8888
- Press the LiveReload button
- Write your specs (example app_coffeescripts_math.coffee goes to app/coffeescripts/math.coffee)
- See the Growl notifications
- Write your code (example spec_coffeescripts_math_spec.coffee goes to app/coffeescripts/math_spec.coffee)
- Watch the Jasmine report
That's it
Thanks for this. I had to change one thing in my Guardfile:
guard 'livereload', :apply_js_live => false do
instead of
guard 'livereload' do