5
파일이 spec/features/login_spec.rb
인 Rails 3.2 앱이 있습니다. 나는 행운을 빌기 위해이 파일이 변경되었을 때 Guard를 실행 시키려고 노력하고있다.spec/features/login_spec.rb의 변경시 Guard가 실행되지 않습니다.
은 여기 내 Guardfile
:
guard :rspec do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch(%r{^spec/factories/(.+)\.rb$}) { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
end
guard 'spork', :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.lock')
watch('spec/spec_helper.rb') { :rspec }
end
내가 spec/models/
파일을 변경
spec/support/
, 그것은 변화와 다시 실행을 선택합니다. 단지
spec/features/' that's no good. It doesn't seem to be Rspec's fault, as running
rspec`이 파일들을 실행하기 때문에 Guard 콘솔에서 [enter]를 누르십시오.
그리고 파일의 이름을 login_spec.rb
외의 다른 파일로 변경하면 픽업됩니다.
그렇다면 Guard는이 파일 이름에 대해 싫어하는 점은 무엇입니까? 어떤 도움이라도 대단히 감사하겠습니다.