Class: Spec::Mocks::Space

Inherits:
Object show all
Defined in:
lib/gems/rspec-1.1.12/lib/spec/mocks/space.rb

Instance Method Summary collapse

Instance Method Details

#add(obj) ⇒ Object



4
5
6
# File 'lib/gems/rspec-1.1.12/lib/spec/mocks/space.rb', line 4

def add(obj)
  mocks << obj unless mocks.detect {|m| m.equal? obj}
end

#reset_allObject



14
15
16
17
18
19
# File 'lib/gems/rspec-1.1.12/lib/spec/mocks/space.rb', line 14

def reset_all
  mocks.each do |mock|
    mock.rspec_reset
  end
  mocks.clear
end

#verify_allObject



8
9
10
11
12
# File 'lib/gems/rspec-1.1.12/lib/spec/mocks/space.rb', line 8

def verify_all
  mocks.each do |mock|
    mock.rspec_verify
  end
end