README.md in qunited-0.4.0 vs README.md in qunited-0.4.1
- old
+ new
@@ -1,7 +1,9 @@
<img src="http://i.imgur.com/NIoQy.png" width="150px" />
+_Pronounced "queue united"_
+
QUnited is a tool to run headless JavaScript tests with QUnit.
Tests are run with PhantomJS if available, otherwise Rhino (Java) is used. Give it a try and let me know if you have any feedback.
## Installation
@@ -34,25 +36,25 @@
```ruby
require 'qunited/rake_task'
QUnited::RakeTask.new do |t|
t.source_files = ['lib/js/jquery.js', 'lib/js/my_app_1.js', 'lib/js/my_app_2.js']
- t.test_files_pattern = 'test/js/**/*.js'
+ t.test_files = 'test/js/**/*.js'
end
```
-Source and test files can be configured either as an array of file names or a glob pattern (using the ```_pattern``` version). Using an array is usually desirable for source files since the order of their execution is often important. Note that all JavaScript dependencies will have to be loaded with source files, in the correct order, to match your production environment.
+Source and test files can be configured either as an array of file names or a glob pattern string. Using an array is usually desirable for source files since the order of their execution is often important. Note that all JavaScript dependencies (jQuery, underscore, etc.) will have to be loaded with source files, in the correct order, to match your production environment.
You can also use an array to configure the test files but a glob pattern might be more convenient since test files usually do not need to be loaded in a particular order.
### Specifying a driver
QUnited uses various drivers to set up the environment the tests run in (see below for more details). By default it tries to Just Work and find an available driver to use. You may want to lock down the driver (recommended) so your tests are consistent. To do this add a bit more configuration to the Rake task.
```ruby
QUnited::RakeTask.new do |t|
t.source_files = ['lib/js/jquery.js', 'lib/js/my_app']
- t.test_files_pattern = 'test/js/**/*.js'
+ t.test_files = 'test/js/**/*.js'
t.driver = :phantomjs # Always use PhantomJS to run tests. Fail if it's not available.
end
```
Available drivers are ```:phantomjs``` and ```:rhino```. If no driver is specified QUnited will run tests with the best available driver, looking for them in that order.