Last active
August 29, 2015 14:07
-
-
Save jbodah/6daca90c5d85f5acadd6 to your computer and use it in GitHub Desktop.
my guardfile
This file contains hidden or 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
# require 'guard/plugin' | |
# | |
# module ::Guard | |
# class BackupifyTest < ::Guard::Plugin | |
# def run_all | |
# end | |
# | |
# def run_on_changes(paths) | |
# paths.each do |path| | |
# raise :task_has_failed unless system "ruby -Itest #{path}" | |
# end | |
# end | |
# end | |
# end | |
guard :minitest, spring: true, all_on_start: false do | |
# Application code | |
watch(%r{^app/models/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" } | |
watch(%r{^lib/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" } | |
watch(%r{^app/controllers/(.+)\.rb$}) { |m| "test/functionals/#{m[1]}_test.rb" } | |
# Test files | |
watch(%r{^test/(unit|functionals|integration|script)/(.+)\.rb$}) { |m| "test/#{m[1]}/#{m[2]}.rb" } | |
end | |
guard :rubocop, all_on_start: false do | |
# Application code | |
watch(%r{^app/(.+)\.rb$}) { |m| "app/#{m[1]}.rb" } | |
watch(%r{^lib/(.+)\.rb$}) { |m| "lib/#{m[1]}.rb" } | |
end | |
guard :flog do | |
# Application code | |
watch(%r{^app/(.+)\.rb$}) { |m| "app/#{m[1]}.rb" } | |
watch(%r{^lib/(.+)\.rb$}) { |m| "lib/#{m[1]}.rb" } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment