Skip to content

Instantly share code, notes, and snippets.

@brentkirby
Created May 6, 2011 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brentkirby/959544 to your computer and use it in GitHub Desktop.
Save brentkirby/959544 to your computer and use it in GitHub Desktop.
guardfile for speccing out a minitest guard
# 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