Class: FlexMock::RSpecFrameworkAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/flexmock/rspec.rb

Defined Under Namespace

Classes: AssertionFailedError

Instance Method Summary collapse

Instance Method Details

#assert_block(msg, &block) ⇒ Object



22
23
24
# File 'lib/flexmock/rspec.rb', line 22

def assert_block(msg, &block)
  SpecModule::Expectations.fail_with(msg) unless yield
end

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



26
27
28
29
# File 'lib/flexmock/rspec.rb', line 26

def assert_equal(a, b, msg=nil)
  message = msg || "Expected equal"
  assert_block(message + "\n<#{a}> expected, but was\n<#{b}>") { a == b }
end

#assertion_failed_errorObject



32
33
34
# File 'lib/flexmock/rspec.rb', line 32

def assertion_failed_error
  SpecModule::Expectations::ExpectationNotMetError
end