Created
July 21, 2011 12:18
-
-
Save oriolgual/1097075 to your computer and use it in GitHub Desktop.
Example Guardfile with annotate, cucumber, minitest and auto-migrate test database
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
guard 'annotate', notify: false do | |
watch( 'db/schema.rb' ) | |
end | |
guard 'cucumber', cli: '--format progress --no-profile', all_on_start: false do | |
watch(%r{features/.+\.feature}) | |
watch(%r{features/step_definitions/(.+)_steps\.rb}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] } | |
end | |
guard 'minitest', drb: false do | |
watch(%r{app/(.+)/(.+)\.rb}) { |m| "test/#{m[1]}/#{m[2]}_test.rb" } | |
watch(%r{test/(.+)/(.+)_test\.rb}) | |
watch(%r{test/test_helper.rb}) { "test" } | |
end | |
guard 'shell' do | |
watch('db/schema.rb') { `rake test:prepare` } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment