Parent

Class/Module Index [+]

Quicksearch

Mocha::Central

Attributes

stubba_methods[RW]

Public Class Methods

new() click to toggle source
# File lib/mocha/central.rb, line 7
def initialize
  self.stubba_methods = []
end

Public Instance Methods

stub(method) click to toggle source
# File lib/mocha/central.rb, line 11
def stub(method)
  unless stubba_methods.include?(method)
    method.stub 
    stubba_methods.push(method)
  end
end
unstub(method) click to toggle source
# File lib/mocha/central.rb, line 18
def unstub(method)
  if stubba_methods.include?(method)
    method.unstub
    stubba_methods.delete(method)
  end
end
unstub_all() click to toggle source
# File lib/mocha/central.rb, line 25
def unstub_all
  while stubba_methods.any? do
    unstub(stubba_methods.first)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.