Class: RSpec::Mocks::Space

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/mocks/space.rb

Instance Method Summary collapse

Instance Method Details

#add(obj) ⇒ Object



4
5
6
# File 'lib/rspec/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/rspec/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/rspec/mocks/space.rb', line 8

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