Skip to content

Instantly share code, notes, and snippets.

@ajsharp
Created October 16, 2009 17:24
Show Gist options
  • Save ajsharp/211897 to your computer and use it in GitHub Desktop.
Save ajsharp/211897 to your computer and use it in GitHub Desktop.
# run this file in RAILS_ROOT with watchr
#
# .watchr template file for rspec test suite
#
# watch all the spec files
watch( '^spec/(.*)/(.*)\.rb' ) { |md|
system("spec #{md[0]} --drb --colour --format progress")
}
# watch the associated files in a rails project
watch( '^app/(.*)/(.*)\.rb' ) { |md|
system("spec --drb --colour --format progress spec/#{md[1]}/#{md[2]}_spec.rb")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment