我的自动测试有问题。它似乎进进出出,这很奇怪。它工作正常然后开始发出咆哮消息APP:无法运行测试。
我不得不搞砸了一段时间才能让自动测试工作,但它似乎真的很不稳定。我是 Rails 新手,所以我确定我做错了什么。
我已经四处寻找答案,并且运行autotest -s rspec2
似乎也不起作用(我在 cd 进入应用程序目录时正在输入)。
每次我运行测试(保存文件)时,我都会得到:
bundle exec /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/bin/rspec --tty '/Users/userx/rails_projects/sample_app/spec/controllers/pages_controller_spec.rb'
/Users/userx/rails_projects/sample_app/spec/spec_helper.rb:2:in
要求':没有要加载的文件 - 来自 /Users/userx/rails_projects/sample_app/spec/spec_helper.rb:2 的 spork (LoadError) 来自 /Users/userx/rails_projects/sample_app/spec/controllers/pages_controller_spec.rb:1 :in require'
from /Users/userx/rails_projects/sample_app/spec/controllers/pages_controller_spec.rb:1
from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in
load' 来自 /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in load_spec_files'
from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in
map' 来自 /Library/Ruby/Gems/1.8/gems /rspec-core-2.4.0/lib/rspec/core/configuration.rb:387:in load_spec_files'
from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/command_line.rb:18:in
run' 来自 /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/ runner.rb:55:in run_in_process'
from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/runner.rb:46:in
run' 来自 /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/lib/rspec/core/runner.rb:10:inautorun'
from /Library/Ruby/Gems/1.8/gems/rspec-core-2.4.0/bin/rspec:4