Class: FlexMock::DefaultFrameworkAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/flexmock-0.8.3/lib/flexmock/default_framework_adapter.rb

Defined Under Namespace

Classes: AssertionFailedError

Instance Method Summary collapse

Instance Method Details

#assert_block(msg, &block) ⇒ Object



16
17
18
19
20
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/default_framework_adapter.rb', line 16

def assert_block(msg, &block)
  unless yield
    fail assertion_failed_error, msg
  end
end

#assert_equal(a, b, msg = nil) ⇒ Object



22
23
24
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/default_framework_adapter.rb', line 22

def assert_equal(a, b, msg=nil)
  assert_block(msg || "Expected equal") { a == b }
end

#assertion_failed_errorObject



27
28
29
# File 'lib/gems/flexmock-0.8.3/lib/flexmock/default_framework_adapter.rb', line 27

def assertion_failed_error
  AssertionFailedError
end