Skip to content

Guard::JasmineNode automatically runs your Jasmine Node specs when files are modified

Notifications You must be signed in to change notification settings

textgoeshere/guard-jasmine-node

 
 

Repository files navigation

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.4, jasmine-node 1.0.10

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.

  • :verbose # default => false

Execute jasmine-node in verbose mode

  • :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

$ rake

Author

Dave Nolan

About

Guard::JasmineNode automatically runs your Jasmine Node specs when files are modified

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%