Module Spork
In: lib/spork/runner.rb
lib/spork.rb

Methods

Classes and Modules

Module Spork::CustomIOStreams
Module Spork::TestFramework
Class Spork::AppFramework
Class Spork::Diagnoser
Class Spork::Forker
Class Spork::RunStrategy
Class Spork::Runner
Class Spork::Server
Class Spork::TestFramework

Constants

BINARY = File.expand_path(File.dirname(__FILE__) + '/../bin/spork')
LIBDIR = Pathname.new(File.expand_path(File.dirname(__FILE__)))

Public Class methods

Run a block after specs are run.

Parameters

  • prevent_double_run - Pass false to disable double run prevention

Run a block AFTER the fork occurs. By default, if prefork is called twice in the same file and line number, the supplied block will only be ran once.

Parameters

  • prevent_double_run - Pass false to disable double run prevention

Used by the server. Called to run all of the after_each_run blocks.

Used by the server. Called to run all of the prefork blocks.

Used by the server. Called when loading the prefork blocks of the code.

Run a block, during prefork mode. By default, if prefork is called twice in the same file and line number, the supplied block will only be ran once.

Parameters

  • prevent_double_run - Pass false to disable double run prevention

Used by the server. Returns the current state of Spork.

Same as trap_method, but for class methods instead

Traps an instance method of a class (or module) so any calls to it don‘t actually run until Spork.exec_each_run

Used by the server. Sets the state to activate spork. Otherwise, prefork and each_run are run in passive mode, allowing specs without a Spork server.

[Validate]