Created
May 6, 2011 18:55
-
-
Save brentkirby/959544 to your computer and use it in GitHub Desktop.
guardfile for speccing out a minitest guard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
require 'guard/guard' | |
module ::Guard | |
class Minitest < ::Guard::Guard | |
def run_all | |
true | |
end | |
def run_on_change(paths) | |
puts "Running #{paths.join(" , ")}" | |
system "ruby -I'test' #{paths.join}" | |
true | |
end | |
end | |
end | |
guard 'minitest' do | |
watch(%r{lib/(.*)\.rb}) { |m| "test/#{m[1]}_test.rb" } | |
watch(%r{test/.*_test\.rb}) | |
watch('test/test_helper.rb') { "test" } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment