Home

Awesome

Runs a single test/spec via rake.

INSTALLATION

sudo gem install single_test

Include in your Rakefile:

require 'single_test/tasks'

USAGE

Single test/spec

Searches for test-files matching the given name.

rake spec:user          #run spec/model/user_spec.rb
rake test:users_c       #run test/functional/users_controller_test.rb
rake spec:admin/users_c #run spec/controllers/admin/users_controller_spec.rb
rake test:u*hel         #run test/helpers/user_helper_test.rb

Searches for test-files by class (Foo::Bar -> foo/bar)

rake spec:Foo::Bar #run spec/foo/bar_spec.rb

Single test-case/example

rake spec:user:token    #run the first spec in user_spec.rb that matches /token/
rake test:user:token    #run all tests in user_test.rb that match /token/

Spec-server

rake spec:user X=       #run test on spec_sever (if one is running...), very fast for quick failure pin-pointing

All one by one

rake spec:one_by_one    #run each spec/test one by one, to find tests that fail when ran
rake test:one_by_one    #on their own or produce strange output

For last modified file

rake test:last
rake spec:last

TIPS

TODO

Authors

Contributors

Michael Grosser<br/> michael@grosser.it<br/> License: MIT Build Status