2015-08-08 17:08:15 +02:00
|
|
|
# A sample Guardfile
|
|
|
|
# More info at https://github.com/guard/guard#readme
|
|
|
|
|
2018-05-23 17:06:55 +02:00
|
|
|
guard :minitest , all_on_start: false do # with Minitest::Unit
|
2017-04-12 19:36:16 +02:00
|
|
|
|
|
|
|
# if any test file changes, run that test
|
2015-08-08 17:08:15 +02:00
|
|
|
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
|
2017-04-12 19:36:16 +02:00
|
|
|
|
|
|
|
# if any helper in any directory changes, run test_all in the same directory
|
2016-12-16 23:15:27 +01:00
|
|
|
watch(%r{^test/(.*/)?helper.rb$}) { |m| "test/#{m[1]}test_all.rb" }
|
2017-04-12 19:36:16 +02:00
|
|
|
|
|
|
|
# if any file XX in any directory in the /lib changes, run a test_XX in the
|
|
|
|
# shadow directory in the /test
|
2015-08-08 17:08:15 +02:00
|
|
|
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
2018-05-07 21:30:43 +02:00
|
|
|
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}1.rb" }
|
|
|
|
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}2.rb" }
|
|
|
|
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}3.rb" }
|
2015-08-08 17:08:15 +02:00
|
|
|
|
2016-12-14 18:06:32 +01:00
|
|
|
#Arm instructions
|
|
|
|
watch(%r{^lib/arm/instructions/(.+)_instruction.rb}) { |m| "test/arm/test_#{m[1]}.rb" }
|
|
|
|
|
2017-04-23 17:43:32 +02:00
|
|
|
#parfait type tests have a whole directory
|
|
|
|
watch(%r{^lib/parfait/type.rb}) { Dir["test/parfait/type/test_*.rb"] }
|
2015-08-08 17:08:15 +02:00
|
|
|
|
2018-06-25 15:32:20 +02:00
|
|
|
# ruby compiler tests have a whole directory
|
2018-06-29 21:46:39 +02:00
|
|
|
watch(%r{^lib/rubyx/ruby_compiler.rb}) { Dir["test/rubyx/ruby_compiler/test_*.rb"] }
|
2018-06-25 15:32:20 +02:00
|
|
|
|
2017-09-10 21:54:36 +02:00
|
|
|
watch(%r{^lib/vool/statements/send_statement.rb}) {
|
2018-06-30 09:08:18 +02:00
|
|
|
[ Dir["test/vool/send/test_*.rb"] ] }
|
2017-04-12 19:18:41 +02:00
|
|
|
|
2018-05-15 18:29:06 +02:00
|
|
|
# message setup
|
2018-04-05 19:10:00 +02:00
|
|
|
watch(%r{^lib/mom/instruction/message_setup.rb}) { Dir["test/mom/send/test_setup*.rb"] }
|
|
|
|
|
2015-08-08 17:08:15 +02:00
|
|
|
end
|