Method: FlexMock.verify_mocking_allowed!

Defined in:
lib/flexmock/core_class_methods.rb

.verify_mocking_allowed!Object

Verify that mocking is allowed in the current context. Throws if it is not.



73
74
75
76
77
# File 'lib/flexmock/core_class_methods.rb', line 73

def verify_mocking_allowed!
  if Thread.current[FORBID_MOCKING]
    throw FORBID_MOCKING
  end
end