No commit activity in last 3 years
No release in over 3 years
Guard::JasmineNode automatically runs your Jasmine Node specs when files are modified
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0.4
 Project Readme

Guard::JasmineNode travis-ci

JasmineNode guard automatically & intelligently executes jasmine node specs when files are modified.

It works brilliantly with Node projects whereas guard-jasmine looks better for jasmine specs in the context of e.g. a Rails app.

  • Tested against Node 0.8.9, jasmine-node 1.0.26

Requirements

Install

Install the gem:

$ gem install guard-jasmine-node

Add guard definition to your Guardfile by running this command:

$ guard init jasmine-node

Usage

$ guard

This will watch your project and execute your specs when files change. It's worth checking out the docs.

Options

  • :all_on_start # default => true

Run all the specs as soon as Guard is started.

  • :all_after_pass # default => true

When files are modified and the specs covering the modified files pass, run all the specs automatically.

  • :keep_failed # default => true

When files are modified, run failing specs as well as specs covering the modified files.

  • :notify # default => true

Display growl/libnotify notifications.

  • :coffeescript # default => true

Load coffeescript and all execution of .coffee files.

  • :forceexit # default => false

Force jasmine-node process to quit after test (can help fix hanging specs)

  • :verbose # default => false

Execute jasmine-node in verbose mode

  • :spec_paths # default => [spec]

Array of paths containing all specs (supply a comma-separated list of paths to override the default)

  • :jasmine_node_bin

Specify the path to the jasmine-node binary that will execute your specs.

The default :jasmine_node_bin in the Guardfile assumes:

  • you are running guard from the root of the project
  • you installed jasmine-node using npm
  • you installed jasmine-node locally to node_modules

If you delete the option completely from the Guardfile, it assumes the jasmine-node binary is already in your $PATH.

So if you have installed jasmine-node globally using e.g. npm install -g jasmine-node, remove the :jasmine_node_bin option from the Guardfile.

Guardfile

Please read the guard docs for more information about the Guardfile DSL.

It's powerful stuff.

Development

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

TODO

  • write a JsonFormatter for jasmine-node so we have finer-grained control over rendering output
  • write an RSpec-style progress formatter (aka lots of green dots)
  • patch Guard to locate CamelCased modules correctly

Testing

Ruby >= 1.9 required.

$ rake

Author

Dave Nolan