Sha256: 2ac762a411033e891abeb85f86cf4186a7ae64ccfe101f26fd55ae2f5b899eb9

Contents?: true

Size: 461 Bytes

Versions: 1

Compression:

Stored size: 461 Bytes

Contents

require "petitest/power_assert/version"
require "power_assert"

module Petitest
  module PowerAssert
    private

    # @note Override
    def check(**args, &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
          result
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
petitest-power_assert-0.1.1 lib/petitest/power_assert.rb