【发布时间】:2015-07-27 15:41:34
【问题描述】:
我正在使用 Ruby、Rspec 和 Cucumber 来运行测试。我有这样的事情:
expect(@response.code).to eql(200)
并且当参数不是200时,显示如下输出:
(compared using eql?)
(RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/accounts_steps.rb:159:in `/^I see an? '(accepted|created|ok)' (create|authorization|payment|confirmation) response$/' features/honduras/honduras-claro-bundle-postpay.feature:9:in
Then I see an 'accepted' create response
我需要在这个输出中添加一些相关信息,所以我想对其进行修改。如果可能的话,我想为此异常修改内置匹配器。有人可以帮忙吗?
非常感谢。
【问题讨论】: