Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5ec19a0754
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (42 sloc) 1.446 kb


Enables you to run your assert tests with spork.

This gem is an adaptation of spork-testunit to work with the assert testing framework.


gem install spork-assert


Run spork in one console.

spork assert

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 sporktest 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 test/test_helper.rb file.

require 'spork'

Spork.prefork do
  ENV["RAILS_ENV"] = "test"
  require File.expand_path('../../config/environment', __FILE__)
  require 'assert'
  require 'assert-rails/test_help'

You will probably also need some Spork.trap_method Jujitsu

Jump to Line
Something went wrong with that request. Please try again.