Skip to content
This repository has been archived by the owner on Dec 9, 2017. It is now read-only.

teaminsight-legacy/spork-assert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

assert-spork

Enables you to run your assert tests with spork.

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

Installation

gem install spork-assert

Usage

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'
end

You will probably also need some Spork.trap_method Jujitsu

About

Use spork with the assert testing framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages