Qspec makes rspec test fast. Q is for queue and quick.
Add this line to your application's Gemfile:
gem 'qspec'
And then execute:
$ bundle
Or install it yourself as:
$ gem install qspec
You can use spork
to cut the overhead of Qspec startup.
Use 1.0. Old spork
does not detect Qspec.
gem 'spork', '~> 1.0rc'
If you are on rails, remember to add spork-rails
too.
By default, qspec uses file based inter-process communication. This is poorly implemented and becomes a burden.
We recommend to use redis
.
- Setting up redis-server with default port
- Add
redis
gem to your Gemfile - Specify
redis
for IPC method in.qspec.yml
Installing this gem adds qspec
and qspec-helper
commands.
$ bundle exec qspec-helper init
# edit .qspec.yml
bundle exec qspec spec/
bundle exec qspec-helper spork
bundle exec qspec spec/
All configuration is done through .qspec.yml
.
qspec-helper init
will generate the template, but there are more options.
This option is given to redis's constructor. See redis-rb/README.md for more details.
redis:
host: localhost
port: 6379
namespace: qspec
driver: hiredis
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request