reflect spec:all task in Guardfile
This commit is contained in:
parent
734e376a23
commit
ddbecab92e
3
Gemfile
3
Gemfile
|
@ -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'
|
||||||
|
|
23
Guardfile
23
Guardfile
|
@ -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" }
|
||||||
|
|
Loading…
Reference in New Issue