Readme.md in mocha_rails-0.0.3 vs Readme.md in mocha_rails-0.0.4

- old
+ new

@@ -2,11 +2,11 @@ MochaRails integrates the [Mocha](http://visionmedia.github.com/mocha/) JavaScript test framework with the Rails (>= 3.1) Asset Pipeline. ## Description -MochaRails is a mountable Rails engine that serves a browser-based Mocha test suite, along with your production JavaScript files, via the Asset Pipeline. +MochaRails is a mountable Rails engine that serves a browser-based Mocha test suite, along with your development JavaScript files, via the Asset Pipeline. It loads [Chai](http://chaijs.com) for assertions, although since Mocha is decoupled from the assertion library, you can use another assertion library if you choose (or even write your own.) The Mocha interface system allows developers to choose their style of DSL. MochaRails is hardcoded for now to the @@ -20,11 +20,14 @@ group :test, :development do gem 'mocha_rails' 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**: ``` rails g mocha_rails:install @@ -70,10 +73,10 @@ @array.indexOf(4).should.equal -1 ``` ## Running -Start your server, and open `http://localhost:3000/mocha`. You should see Mocha's very attractive results page. If you +Start your server in development mode, and open `http://localhost:3000/mocha`. You should see Mocha's very attractive results page. If you 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. ## Credits * Chris Smith (quartzmo)