2011-11-23 22:57:19 +00:00
|
|
|
# Run JS and CoffeeScript files in a typical Rails 3.1/Sprockets fashion.
|
2011-05-24 10:37:18 +00:00
|
|
|
# Your spec files end with _spec.{js,coffee}.
|
|
|
|
|
|
|
|
spec_location = "spec/javascripts/%s_spec"
|
|
|
|
|
|
|
|
# uncomment if you use NerdCapsSpec.js
|
|
|
|
# spec_location = "spec/javascripts/%sSpec"
|
2011-05-24 01:28:01 +00:00
|
|
|
|
|
|
|
guard 'jasmine-headless-webkit' do
|
2011-11-23 22:57:19 +00:00
|
|
|
watch(%r{^(app|lib|vendor)/assets/javascripts/(.*)$}) { |m| newest_js_file(spec_location % m[1]) }
|
|
|
|
watch(%r{^spec/javascripts/(.*)[Ss]pec\..*}) { |m| newest_js_file(spec_location % m[1]) }
|
2011-05-24 01:28:01 +00:00
|
|
|
end
|
|
|
|
|