crnixon (owner)

Revisions

  • 18f1d4 crnixon Fri Sep 25 08:31:35 -0700 2009
  • 219ec4 crnixon Fri Sep 25 08:29:53 -0700 2009
gist: 193622 Download_button fork
public
Public Clone URL: git://gist.github.com/193622.git
Embed All Files: show embed
rails_watchr_script.rb #
1
2
3
4
5
6
7
8
9
10
11
watch('test/.+\.rb') { |md| system("ruby -Itest #{md[0]}")}
watch('app/models/(.+)\.rb') { |md| system("ruby -Itest test/unit/#{md[1]}_test.rb")}
watch('app/controllers/(.+)\.rb') { |md| system("ruby -Itest test/functional/#{md[1]}_test.rb")}
watch('app/views/(.+?)/') { |md| system("ruby -Itest test/functional/#{md[1]}_controller_test.rb")}
 
# More specific rules
watch('app/controllers/application_controller.rb') { |md| system("rake test:functionals") }
watch('config/routes.rb') { |md| system("rake test:functionals") }
watch('config/environment.rb') { |md| system("rake test") }
watch('config/initializers/.+') { |md| system("rake test") }
watch('config/environments/test.rb') { |md| system("rake test") }