class ChefSpec::Stubs::Registry

Attributes

stubs[RW]

@return [Hash<Symbol, Array<SearchStub>>]

Public Class Methods

new() click to toggle source
# File lib/chefspec/stubs/registry.rb, line 14
def initialize
  reset!
end

Public Instance Methods

register(stub) click to toggle source
# File lib/chefspec/stubs/registry.rb, line 22
def register(stub)
  @stubs.insert(0, stub)
  stub
end
reset!() click to toggle source
# File lib/chefspec/stubs/registry.rb, line 18
def reset!
  @stubs = []
end
stub_for(*args) click to toggle source
# File lib/chefspec/stubs/registry.rb, line 27
def stub_for(*args)
  raise ArgumentError, "#stub_for is an abstract function"
end