1

我正在使用 ruby​​ 1.9.2p318、rails 3.1.3 和以下 gem:

gem 'debugger'
gem 'spork', '~> 0.9.0.rc'
gem 'spork-testunit'
gem 'guard-spork'

当我在终端中使用 spork 并运行包含“调试器”行的测试时,一切正常,我可以在启动 spork 的同一选项卡中访问调试器提示。

但是,当我使用 spork 启动时bundle exec guard,调试器不稳定。就像没有可用的内存一样。该窗口有时对键盘没有响应,并且不会响应粘贴。我的保护文件包括以下 spork:

guard 'spork',  :test_unit_env => { 'RAILS_ENV' => 'test' }, 
    :cucumber_env => { 'RAILS_ENV' => 'test' }, 
    :rspec_env => { 'RAILS_ENV' => 'test' } 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 }
  watch('test/test_helper.rb') { :test_unit }
  watch(%r{features/support/}) { :cucumber }
end

有没有人有同样的经历或知道如何解决这个问题?谢谢!

4

0 回答 0