Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Closes #7. Removed sprockets directives from mocha-suite.js

  • Loading branch information...
commit 7a780d3be69be455033ba3188b418091eb009eb7 1 parent 6693c3b
@quartzmo authored
Showing with 16 additions and 3 deletions.
  1. +4 −1 Readme.md
  2. +12 −2 lib/generators/mocha_rails/templates/mocha-suite.js
View
5 Readme.md
@@ -22,7 +22,10 @@ group :test, :development do
end
```
MochaRails includes a convenient install generator that adds a route to `config/routes.rb` and adds a `mocha-suite.js`
-Sprockets manifest file to either `spec/javascripts` or `test/javascripts`.
+Sprockets manifest file to either `spec/javascripts` or `test/javascripts`. The `mocha-suite.js` file contains no `require`
+directives other than , you must add the requires for your tests yourself. Avoid using `require_tree .` which has caused an
+[issue](https://github.com/quartzmo/mocha_rails/issues/7), instead use more specific
+requires for each spec or test file, such as `//= require ./models/my-model-test`.
To install the required configuration, **you must run**:
View
14 lib/generators/mocha_rails/templates/mocha-suite.js
@@ -1,2 +1,12 @@
-//= require application
-//= require_tree .
+// This is a manifest file that will be compiled and included in the mocha_rails test page, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, app/assets/javascripts, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//= require application
Please sign in to comment.
Something went wrong with that request. Please try again.