In a fact Im calling
Puppet::Type('user').instances.select do |user|
#do something with user
end
How can I stub that in a spec test? I have something like:
Puppet::Type.type(:user).stubs(:instances).returns(
'User[root]','User[bin]'])
but that stubs it with an array and not a User object. How can I stub it correctly?