The tests for this module are written in Ruby, and are acceptance tests.
To run them is needed to have an environment with:
* Basic requirements
** ruby >= 1.8.7
** rubygems >= 1.6.2
** rake >= 0.8.7
* Required gems
** POpen4 >= 0.1.4
** em-http-request >= 0.2.14
** json >= 1.4.3
** ruby-debug >= 0.10.4
You can install these gems with bundler (bundler is required to be installed before, _gem install bundler_)
<pre>
<code>
cd test/
bundle install --without docs
</code>
</pre>
or individually
<pre>
<code>
gem install POpen4 -v 0.1.4
gem install em-http-request -v 0.2.14
gem install json -v 1.4.3
gem install ruby-debug -v 0.10.4
</code>
</pre>
Then issue <code>rake tests</code>.
This command run the tests using nginx *executable* located at _/usr/local/nginx/sbin/nginx_ with _1_ *worker* responding at *host* _localhost_ and *port* _9990_.
To change this behavior use the commands bellow
<pre>
<code>
rake tests executable="../build/nginx-1.0.0/objs/nginx" # to change default path for nginx executable
rake tests host=localhost # to change default hostname
rake tests port=9889 # to change default port
rake tests workers=2 # to change dafault number of workers used