Skip to content

Commit

Permalink
reflect spec:all task in Guardfile
Browse files Browse the repository at this point in the history
  • Loading branch information
schnittchen committed Feb 3, 2013
1 parent 734e376 commit ddbecab
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ end
gem "rails", rails
gem "mongoid", mongoid if mongoid
gem "devise", devise if devise

gem 'guard-rspec'
gem 'rb-fsevent'
23 changes: 22 additions & 1 deletion Guardfile
Original file line number Diff line number Diff line change
@@ -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{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
Expand Down

0 comments on commit ddbecab

Please sign in to comment.