|
|
|
@ -1,4 +1,18 @@ |
|
|
|
|
guard :rspec do |
|
|
|
|
# :spork guard must come first |
|
|
|
|
guard :spork, :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do |
|
|
|
|
watch('config/application.rb') |
|
|
|
|
watch('config/environment.rb') |
|
|
|
|
watch('config/environments/test.rb') |
|
|
|
|
watch(%r{^config/initializers/.+\.rb$}) |
|
|
|
|
watch('Gemfile') |
|
|
|
|
watch('Gemfile.lock') |
|
|
|
|
watch('spec/spec_helper.rb') { :rspec } |
|
|
|
|
watch(%r{^spec/support/.+\.rb$}) { :rspec } |
|
|
|
|
watch('test/test_helper.rb') { :test } |
|
|
|
|
watch(%r{features/support/}) { :cucumber } |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
guard :rspec, :cli => "--drb" do |
|
|
|
|
watch(%r{^spec/.+_spec\.rb$}) |
|
|
|
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } |
|
|
|
|
watch('spec/spec_helper.rb') { "spec" } |
|
|
|
@ -19,13 +33,13 @@ guard :rspec do |
|
|
|
|
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
guard :cucumber do |
|
|
|
|
guard :cucumber do # , :cli => "--drb" do |
|
|
|
|
watch(%r{^features/.+\.feature$}) |
|
|
|
|
watch(%r{^features/support/.+$}) { 'features' } |
|
|
|
|
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' } |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
guard :test do |
|
|
|
|
guard :test, :all_on_start => false, :all_after_pass => false do # , :drb => true do |
|
|
|
|
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" } |
|
|
|
|
watch(%r{^test/.+_test\.rb$}) |
|
|
|
|
watch('test/test_helper.rb') { "test" } |
|
|
|
|