Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 14 lines (9 sloc) 0.434 kb
7d07be1 @romanvbabenko [+] watchr & rspec config example files
romanvbabenko authored
1 ROOT_PATH = File.dirname(__FILE__)
2
3 def run_spec(file)
4 system "rspec #{file}" if File.exist?(File.join(ROOT_PATH, file))
5 end
6
7 watch('spec/.*_spec\.rb') {|m| run_spec m[0] }
8 watch('spec/notes/.*_spec\.rb') {|m| run_spec m[0] }
9
10 watch('lib/rails-footnotes/(.*)\.rb') {|m| run_spec("spec/#{m[1]}_spec.rb") }
11 watch('lib/rails-footnotes/notes/.*_note\.rb') {|m| run_spec("spec/notes/#{m[1]}") }
12
13 watch('Gemfile') {|m| run_spec("spec") }
Something went wrong with that request. Please try again.