Class: MotionSpec::Stubs

Inherits:
Object show all
Defined in:
lib/motion-spec/mock/stubs.rb

Class Method Summary collapse

Class Method Details

.add(object, method) ⇒ Object



5
6
7
# File 'lib/motion-spec/mock/stubs.rb', line 5

def add(object, method)
  stubs << [object, method]
end

.clear!Object



13
14
15
# File 'lib/motion-spec/mock/stubs.rb', line 13

def clear!
  stubs.each { |object, method| object.reset(method) }
end

.stubsObject



9
10
11
# File 'lib/motion-spec/mock/stubs.rb', line 9

def stubs
  @stubs ||= []
end