Module: AncientMock

Defined in:
lib/ancient_mock.rb,
lib/ancient_mock/version.rb

Defined Under Namespace

Modules: TestExtensions Classes: ExpectationDefinition, ExpectationTarget, StubTarget, Stubber

Constant Summary collapse

ExpectationNotSatisfied =
Class.new(StandardError)
VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.expectationsObject



130
131
132
# File 'lib/ancient_mock.rb', line 130

def self.expectations
  @expectations ||= []
end

.resetObject



123
124
125
126
127
128
# File 'lib/ancient_mock.rb', line 123

def self.reset
  expectations.each(&:verify)
ensure
  expectations.clear
  Stubber.reset
end