Aug*_*aza 2 ruby rspec ruby-on-rails
我正在生成一些自动规范,并且我希望在期望成功的时候有一个自定义的成功消息。例如,我想要这样的报告:
Opportunity
  .rating_info
    where the real estate kind is Monoambiente
      and there aren't assigned values
        is 0
      when there are multiple combinations
        is has the expected value(run 45 different combinations)
class PedrazaFormatter < BaseTextFormatter
        Formatters.register self, :example_passed
        def init(times = 0)
          self.times = times
        end
        def example_passed(_notification)
          output.print "Test was successful #{self.times} times"
        end
end
我希望这有帮助。如果您还有其他问题,请告诉我。
| 归档时间: | 
 | 
| 查看次数: | 245 次 | 
| 最近记录: |