guard rspec upgrade

This commit is contained in:
Sam 2013-04-25 17:22:13 +10:00
parent ef875bba12
commit 05fb871a40
2 changed files with 24 additions and 24 deletions

View file

@ -209,7 +209,7 @@ GEM
guard-jshint-on-rails (0.0.2) guard-jshint-on-rails (0.0.2)
guard (>= 1.0.0) guard (>= 1.0.0)
jshint_on_rails (>= 1.0.2) jshint_on_rails (>= 1.0.2)
guard-rspec (2.4.0) guard-rspec (2.5.1)
guard (>= 1.1) guard (>= 1.1)
rspec (~> 2.11) rspec (~> 2.11)
guard-spork (1.4.2) guard-spork (1.4.2)

View file

@ -1,13 +1,3 @@
guard :spork, wait: 120 do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.*\.rb$})
watch(%r{^config/initializers/.*\.rb$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
end
phantom_path = File.expand_path('~/phantomjs/bin/phantomjs') phantom_path = File.expand_path('~/phantomjs/bin/phantomjs')
phantom_path = nil unless File.exists?(phantom_path) phantom_path = nil unless File.exists?(phantom_path)
@ -36,6 +26,17 @@ guard 'jshint-on-rails', config_path: 'config/jshint.yml' do
watch(%r{^spec/javascripts/.*\.js$}) watch(%r{^spec/javascripts/.*\.js$})
end end
unless ENV["USING_AUTOSPEC"]
guard :spork, wait: 120 do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.*\.rb$})
watch(%r{^config/initializers/.*\.rb$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
end
guard 'rspec', :focus_on_failed => true, :cli => "--drb" do guard 'rspec', :focus_on_failed => true, :cli => "--drb" do
watch(%r{^spec/.+_spec\.rb$}) watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/components/#{m[1]}_spec.rb" } watch(%r{^lib/(.+)\.rb$}) { |m| "spec/components/#{m[1]}_spec.rb" }
@ -50,9 +51,8 @@ guard 'rspec', :focus_on_failed => true, :cli => "--drb" do
# Capybara request specs # Capybara request specs
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
end end
end
module ::Guard module ::Guard
class AutoReload < ::Guard::Guard class AutoReload < ::Guard::Guard