Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (34 sloc) 1.726 kb
c0618287 »
2012-04-10 set up bundler with spork, bundle, rspec & cucumber
1 # A sample Guardfile
2 # More info at https://github.com/guard/guard#readme
3
4 guard 'bundler' do
5 watch('Gemfile')
6 end
7
8 guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' }, :test_unit => false do
9 watch('config/application.rb')
10 watch('config/environment.rb')
11 watch(%r{^config/environments/.+\.rb$})
12 watch(%r{^config/initializers/.+\.rb$})
13 watch('Gemfile')
14 watch('Gemfile.lock')
15 watch('spec/spec_helper.rb') { :rspec }
16 watch(%r{features/support/}) { :cucumber }
17 end
18
32bb8137 »
2012-04-10 set up bin stubs, growl and should been fully automated for testing now
19 guard 'cucumber', :cli => '--drb', :binstubs => true do
c0618287 »
2012-04-10 set up bundler with spork, bundle, rspec & cucumber
20 watch(%r{^features/.+\.feature$})
21 watch(%r{^features/support/.+$}) { 'features' }
22 watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
23 end
24
32bb8137 »
2012-04-10 set up bin stubs, growl and should been fully automated for testing now
25 guard 'rspec', :version => 2, :cli => '--drb', :binstubs => true do
c0618287 »
2012-04-10 set up bundler with spork, bundle, rspec & cucumber
26 watch(%r{^spec/.+_spec\.rb$})
27 watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
28 watch('spec/spec_helper.rb') { "spec" }
29
30 # Rails example
31 watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
32 watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
33 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"] }
34 watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
35 watch('config/routes.rb') { "spec/routing" }
36 watch('app/controllers/application_controller.rb') { "spec/controllers" }
37 # Capybara request specs
38 watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
39 end
40
Something went wrong with that request. Please try again.