【发布时间】:2012-11-02 10:18:50
【问题描述】:
由于某种原因,RSpec 无法识别我的一个规范文件中的断言 - 而是围绕它运行 print 语句。
要开始规范测试,在终端上:
rspec spec/lib/slots_scheduler_spec.rb
声明...的部分规范文件(是循环的一部分)
print "#{slots_result[0].date} #{slot.date}\n"
slots_result[0].date.should == slot.date
我在控制台上看到的...
....
2012-11-18 2012-11-11
2012-11-25 2012-11-11
No examples found.
Finished in 0.00005 seconds
0 examples, 0 failures
如果出现问题,我希望得到除“0 个示例,0 个失败”之外的其他消息。为什么我的测试会被这样忽略?
【问题讨论】:
-
好吧——我真的明白了为什么......我没有围绕“它......做”进行测试。这很尴尬..
标签: ruby-on-rails rspec