rubyx/Guardfile

32 lines
1.2 KiB
Plaintext
Raw Normal View History

2015-08-08 17:08:15 +02:00
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
2017-04-12 19:36:16 +02:00
guard :minitest do # with Minitest::Unit
# 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
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" }
#Arm instructions
watch(%r{^lib/arm/instructions/(.+)_instruction.rb}) { |m| "test/arm/test_#{m[1]}.rb" }
#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
# Vool to_mom compile process + # Ruby to vool compile process
2017-09-04 20:30:53 +02:00
watch(%r{^lib/vool/statements/(.+)_statement.rb}) { |m|
[ Dir["test/vool/to_mom/test_#{m[1]}*.rb"] , "test/vool/statements/test_#{m[1]}.rb"] }
watch(%r{^lib/vool/statements/send_statement.rb}) {
[ Dir["test/vool/to_mom/send/test_*.rb"] , "test/vool/statements/test_send_statement.rb"] }
#message setup
watch(%r{^lib/mom/instruction/message_setup.rb}) { Dir["test/mom/send/test_setup*.rb"] }
2015-08-08 17:08:15 +02:00
end