Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure guard runs specs for .js.coffee files

With the default Guardfile, newest_js_file will try to look for file matching "spec/javascripts/foo.js_spec" instead of "spec/javascripts/foo_spec"
  • Loading branch information...
commit 9408f614af94387dbbb50f57b179179d6347502b 1 parent 6e2be80
@sidonath authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/guard/jasmine-headless-webkit/templates/Guardfile
View
2  lib/guard/jasmine-headless-webkit/templates/Guardfile
@@ -9,7 +9,7 @@ spec_location = "spec/javascripts/%s_spec"
guard 'jasmine-headless-webkit' do
watch(%r{^app/views/.*\.jst$})
watch(%r{^public/javascripts/(.*)\.js$}) { |m| newest_js_file(spec_location % m[1]) }
- watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)$}) { |m| newest_js_file(spec_location % m[1]) }
+ watch(%r{^app/assets/javascripts/(.*?)\.(js(\.coffee)?|coffee)$}) { |m| newest_js_file(spec_location % m[1]) }
watch(%r{^spec/javascripts/(.*)_spec\..*}) { |m| newest_js_file(spec_location % m[1]) }
end
Please sign in to comment.
Something went wrong with that request. Please try again.