lib/petitest/power_assert.rb in petitest-power_assert-0.1.1 vs lib/petitest/power_assert.rb in petitest-power_assert-0.2.0

- old
+ new

@@ -4,15 +4,14 @@ module Petitest module PowerAssert private # @note Override - def check(**args, &block) + def check(message, &block) ::PowerAssert.start(block, assertion_method: __callee__) do |power_assert| result = power_assert.yield - message = power_assert.message - message = nil if message.empty? - super(**args, message: message) do + message = power_assert.message unless power_assert.message.empty? + super(message) do result end end end end