mocha_rails 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Readme.md
CHANGED
@@ -4,7 +4,7 @@ MochaRails integrates the [Mocha](http://visionmedia.github.com/mocha/) JavaScri
|
|
4
4
|
|
5
5
|
## Description
|
6
6
|
|
7
|
-
MochaRails is a mountable Rails engine that serves a browser-based Mocha test suite, along with your
|
7
|
+
MochaRails is a mountable Rails engine that serves a browser-based Mocha test suite, along with your development JavaScript files, via the Asset Pipeline.
|
8
8
|
|
9
9
|
It loads [Chai](http://chaijs.com) for assertions, although since Mocha is decoupled from the assertion library, you can
|
10
10
|
use another assertion library if you choose (or even write your own.)
|
@@ -22,7 +22,10 @@ group :test, :development do
|
|
22
22
|
end
|
23
23
|
```
|
24
24
|
MochaRails includes a convenient install generator that adds a route to `config/routes.rb` and adds a `mocha-suite.js`
|
25
|
-
Sprockets manifest file to either `spec/javascripts` or `test/javascripts`.
|
25
|
+
Sprockets manifest file to either `spec/javascripts` or `test/javascripts`. The `mocha-suite.js` file contains no `require`
|
26
|
+
directives other than , you must add the requires for your tests yourself. Avoid using `require_tree .` which has caused an
|
27
|
+
[issue](https://github.com/quartzmo/mocha_rails/issues/7), instead use more specific
|
28
|
+
requires for each spec or test file, such as `//= require ./models/my-model-test`.
|
26
29
|
|
27
30
|
To install the required configuration, **you must run**:
|
28
31
|
|
@@ -72,7 +75,7 @@ describe 'Array', ->
|
|
72
75
|
|
73
76
|
## Running
|
74
77
|
|
75
|
-
Start your server, and open `http://localhost:3000/mocha`. You should see Mocha's very attractive results page. If you
|
78
|
+
Start your server in development mode, and open `http://localhost:3000/mocha`. You should see Mocha's very attractive results page. If you
|
76
79
|
see a completely blank page, or an almost blank page with a few zeros in the upper right corner, check your JavaScript console for errors.
|
77
80
|
|
78
81
|
## Credits
|
@@ -1 +1,12 @@
|
|
1
|
-
|
1
|
+
// This is a manifest file that will be compiled and included in the mocha_rails test page, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, app/assets/javascripts, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//= require application
|
data/lib/mocha_rails/version.rb
CHANGED