class ChefSpec::Stubs::SearchRegistry

def stub_for(type, query = "*:*")

def stub_for(type, query = "*:*")
  @stubs.find do |stub|
    stub.type.to_s == type.to_s && stub.query === query
  end
end