Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Guard::Minitest automatically run your tests (much like autotest)

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Guardfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 guard-minitest.gemspec
README.rdoc

Guard::Minitest

Minitest guard allows to automatically & intelligently launch tests when files are modified.

  • Compatible with MiniTest 1.7.x

  • Tested on Ruby 1.8.7 & 1.9.2.

Install

Please be sure to have guard installed before continue.

Install the gem:

gem install guard-minitest

Add it to your Gemfile (inside test group):

gem 'guard-minitest'

Add guard definition to your Guardfile by running this command:

guard init minitest

Usage

Please read guard usage doc

Guardfile

Minitest guard can be really be adapated to all kind of projects. Please read guard doc for more info about Guardfile DSL.

Standard ruby gems with Minitest::Unit

guard 'minitest' do
  watch('^test/test_(.*).rb')
  watch('^lib/(.*)([^/]+)\.rb')                     { |m| "test/#{m[1]}test_#{m[2]}.rb" }
  watch('^test/test_helper.rb')                     { "test" }
end

Standard ruby gems with Minitest::Spec

guard 'minitest' do
  watch('^spec/(.*)_spec.rb')
  watch('^lib/(.*)\.rb')                            { |m| "spec/#{m[1]}_spec.rb" }
  watch('^spec/spec_helper.rb')                     { "spec" }
end

Options

You can force seed for minitest with:

guard 'minitest', :seed => 12345 do
  ...
end

You can set verbose mode for minitest with:

guard 'minitest', :verbose => true do
  ...
end

Development

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Authors

Yann Lugrin

Something went wrong with that request. Please try again.