2013-03-13 16 views
0

嗯,我正在努力實現一件事。什麼幻想,但值得一試..Rspec:如何捕獲示例,故障和等待計數

當我運行bundle exec rspec spec/

我的測試用例通過了,我也得到

Finished in 5.12 seconds 
38 examples, 0 failures, 1 pending 

我想使用的MAC OS say命令(閱讀here它)。測試套件完成之後會說,那you have 38 examples, 0 failures and 1 pending example

例如命令

say you have example_count examples, failures_count failures and pending_count pending examples

的要求是,我需要捕獲實施例,故障並且其中我可以say命令使用一個變量懸而未決。

回答