Rspec 3 中的 rake 规范是否应该始终以“rake aborted”结尾?
每次我使用 Rspec2 和 Rails3 运行 rake spec 时,它都会以 rake 中止结束。想知道这是正常行为还是我在此过程中犯了一些错误?
........
Finished in 0.01589 seconds
7 examples, 6 failures, 1 pending
rake aborted!
ruby -S bundle exec rspec "./spec/helpers/homes_helper_spec.rb" "./spec/models/habit_spec.rb" failed
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rspec-core-2.0.1/lib/rspec/core/rake_task.rb:117:in `initialize'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:1112:in `verbose'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rspec-core-2.0.1/lib/rspec/core/rake_task.rb:109:in `send'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rspec-core-2.0.1/lib/rspec/core/rake_task.rb:109:in `initialize'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/Users/jack/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/bin/rake:31
/Users/jack/.rvm/gems/ruby-1.8.7-p174/bin/rake:19:in `load'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/bin/rake:19
Everytime I run rake spec with Rspec2 and Rails3 it finishes with rake aborted. Wondering if this is normal behaviour or if I have made some mistake along the way?
........
Finished in 0.01589 seconds
7 examples, 6 failures, 1 pending
rake aborted!
ruby -S bundle exec rspec "./spec/helpers/homes_helper_spec.rb" "./spec/models/habit_spec.rb" failed
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rspec-core-2.0.1/lib/rspec/core/rake_task.rb:117:in `initialize'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:1112:in `verbose'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rspec-core-2.0.1/lib/rspec/core/rake_task.rb:109:in `send'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rspec-core-2.0.1/lib/rspec/core/rake_task.rb:109:in `initialize'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/Users/jack/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/gems/rake-0.8.7/bin/rake:31
/Users/jack/.rvm/gems/ruby-1.8.7-p174/bin/rake:19:in `load'
/Users/jack/.rvm/gems/ruby-1.8.7-p174/bin/rake:19
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当你遇到失败时,这很正常。
Its normal when you've got failures.
目前,执行 rspec spec/ 不会产生巨大的“rake aborted!”堆栈跟踪,但默认情况下,您的 Rakefile 任务会。要抑制这种情况,请尝试在 Rakefile 中添加类似的内容。
At the moment, doing
rspec spec/
will not produce the huge "rake aborted!" stack trace, but by default, your Rakefile task will. To suppress this, try sticking something like this in your Rakefile.