Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 34 lines (29 sloc) 1.523 kb
b26665e @lda ActiveRecord methods
lda authored
1 # A sample Guardfile
2 # More info at https://github.com/guard/guard#readme
3
4 guard 'rspec', :version => 2 do
5 watch(%r{^spec/.+_spec\.rb$})
6 watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7 watch('spec/spec_helper.rb') { "spec" }
8
9 # Rails example
10 watch(%r{^spec/.+_spec\.rb$})
11 watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
12 watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
13 watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
14 watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
15 watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
16 watch('spec/spec_helper.rb') { "spec" }
17 watch('config/routes.rb') { "spec/routing" }
18 watch('app/controllers/application_controller.rb') { "spec/controllers" }
19 # Capybara request specs
20 watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
21 end
22
23
24 guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
25 watch('config/application.rb')
26 watch('config/environment.rb')
27 watch(%r{^config/environments/.+\.rb$})
28 watch(%r{^config/initializers/.+\.rb$})
29 watch('Gemfile')
30 watch('Gemfile.lock')
31 watch('spec/spec_helper.rb')
32 watch('test/test_helper.rb')
33 end
Something went wrong with that request. Please try again.