class FlexMock::TestUnitFrameworkAdapter
Adapter for adapting FlexMock
to the Test::Unit
framework.
Attributes
assertions[RW]
Public Class Methods
new()
click to toggle source
# File lib/flexmock/test_unit_integration.rb, line 49 def initialize @assertions = 0 end
Public Instance Methods
assertion_failed_error()
click to toggle source
# File lib/flexmock/test_unit_integration.rb, line 67 def assertion_failed_error defined?(Test::Unit::AssertionFailedError) ? Test::Unit::AssertionFailedError : MiniTest::Assertion end
check(msg, &block)
click to toggle source
# File lib/flexmock/test_unit_integration.rb, line 63 def check(msg, &block) make_assertion(msg, &block) end
check_failed_error()
click to toggle source
# File lib/flexmock/test_unit_integration.rb, line 73 def check_failed_error assertion_failed_error end
make_assertion(msg, backtrace = caller) { || ... }
click to toggle source
# File lib/flexmock/test_unit_integration.rb, line 53 def make_assertion(msg, backtrace = caller, &block) unless yield msg = msg.call if msg.is_a?(Proc) assert(false, msg) end rescue assertion_failed_error => ex ex.message.sub!(/Expected block to return true value./,'') raise ex end