Giter VIP home page Giter VIP logo

spork-minitest's Introduction

spork-minitest

MiniTest runner for Spork. A successor to spork-testunit with the following differences:

  • Supports only Ruby 1.9.

  • Allows passing any options to MiniTest.

    Normally you pass them right at the end:

    ruby test/test_first.rb --seed 12345 -n test_truth

    When using testdrb you pass them after a double dash:

    testdrb test/first_test.rb -- --seed 12345 -n test_truth

  • Exits with proper code (0 for success, 1 for failure).

    Some automated test running tools like Autotest and Guard rely on this to detect test failure.

  • Does not support -I option to modify load path.

Usage

Add it to your gemfile.

gem "spork-minitest", "~> 1.0.0.beta1"

Install spork into your test helper using the following command or manually.

spork minitest --bootstrap

Start spork and run your tests using testdrb. Some examples:

testdrb test/integration_test.rb
testdrb test/integration_test.rb -- --seed 1234
SPORK_PORT=8989 testdrb test/integration_test.rb

If you do require 'test_helper' in every test you will get LoadError: cannot load such file -- test_helper. To fix that add the following to the very top of your test helper:

$LOAD_PATH << "test"

Different test helper

You can specify different test helper when starting spork and run tests as usual.

HELPER_FILE=spec/spec_helper.rb spork minitest

You can run all tests over Spork by adding the following lines to your .autotest file.

class Autotest
  # run tests over drb server (spork)
  def make_test_cmd files_to_test
    if files_to_test.empty?
      "" # no tests to run
    else
      "bin/testdrb #{files_to_test.keys.join(' ')}"
    end
  end
end

License

Spork-MiniTest is released under the MIT License.

spork-minitest's People

Contributors

semaperepelitsa avatar pmq20 avatar gerald-kim avatar

Watchers

AlejandroGQ avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.