Skip to content

Instantly share code, notes, and snippets.

@cromwellryan
Created February 5, 2013 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cromwellryan/4716069 to your computer and use it in GitHub Desktop.
Save cromwellryan/4716069 to your computer and use it in GitHub Desktop.
# https://github.com/guard/guard#readme
guard 'jasmine-node', :jasmine_node_bin => File.expand_path(File.dirname(__FILE__) + "/node_modules/jasmine-node/bin/jasmine-node"), :spec_paths => ['specs'] do
# standard run the spec that changes
watch(%r{^specs/(.+)_spec\.(js\.coffee|js|coffee)})
# run the spec for the file that changed... then all
watch(%r{^(?!specs)(.+)\.(js\.coffee|js|coffee)}) { |m| "specs/#{m[1]}_spec.#{m[2]}" if File.exist?("specs/#{m[1]}_spec.#{m[2]}") }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment