reflect spec:all task in Guardfile

This commit is contained in:
Thomas Stratmann 2013-02-03 20:02:53 +01:00
parent 734e376a23
commit ddbecab92e
2 changed files with 25 additions and 1 deletions

View File

@ -35,3 +35,6 @@ end
gem "rails", rails gem "rails", rails
gem "mongoid", mongoid if mongoid gem "mongoid", mongoid if mongoid
gem "devise", devise if devise gem "devise", devise if devise
gem 'guard-rspec'
gem 'rb-fsevent'

View File

@ -1,4 +1,25 @@
guard 'rspec', :version => 2, :notification => false do def rspec_guard(options = {}, &block)
options = {
:version => 2,
:notification => false
}.merge(options)
guard 'rspec', options, &block
end
rspec_guard :spec_paths => %w{spec/draper spec/generators} do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
rspec_guard :spec_paths => 'spec/integration', :env => {'RAILS_ENV' => 'development'} do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
rspec_guard :spec_paths => 'spec/integration', :env => {'RAILS_ENV' => 'production'} do
watch(%r{^spec/.+_spec\.rb$}) watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" } watch('spec/spec_helper.rb') { "spec" }