Class: MiniSpec::Mocks::MultipleStubsProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/minispec/mocks/stubs.rb

Instance Method Summary collapse

Constructor Details

#initialize(stubs) ⇒ MultipleStubsProxy

Returns a new instance of MultipleStubsProxy.



4
5
6
# File 'lib/minispec/mocks/stubs.rb', line 4

def initialize stubs
  @stubs = stubs.freeze
end

Instance Method Details

#with(*a, &b) ⇒ Object



8
9
10
11
# File 'lib/minispec/mocks/stubs.rb', line 8

def with *a, &b
  @stubs.each {|s| s.with(*a, &b)}
  self
end

#with_any(*a, &b) ⇒ Object



13
14
15
16
# File 'lib/minispec/mocks/stubs.rb', line 13

def with_any *a, &b
  @stubs.each {|s| s.with_any(*a, &b)}
  self
end