Class: ChefSpec::Stubs::DataBagRegistry

Inherits:
Registry
  • Object
show all
Defined in:
lib/chefspec/stubs/data_bag_registry.rb

Instance Attribute Summary

Attributes inherited from Registry

#stubs

Instance Method Summary collapse

Methods inherited from Registry

#initialize, #register, #reset!

Constructor Details

This class inherits a constructor from ChefSpec::Stubs::Registry

Instance Method Details

#stub_for(bag) ⇒ Object


6
7
8
9
10
# File 'lib/chefspec/stubs/data_bag_registry.rb', line 6

def stub_for(bag)
  @stubs.find do |stub|
    stub.bag.to_s == bag.to_s
  end
end