This gem is an adaptation of spork-testunit to work with the assert testing framework.
gem install spork-assert
spork in one console.
In another console, use
sporktest to run your tests. You can use assert's
rake test task names to run only a subset of your tests.
sporktest # run all tests sporktest test:unit # run only unit tests sporktest test:functional:your_controller # run a single test
Note: There is no need to use
bundle exec when running the
command. It is completely unnecessary and adds additional wait time before
your tests are run.
Configuring rails applications to work with spork-assert
Add spork-assert to your Gemfile.
gem 'spork-assert', :require => false
Set up spork and assert in your
require 'spork' Spork.prefork do ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'assert' require 'assert-rails/test_help' end
You will probably also need some Spork.trap_method Jujitsu