Hi,
I'm trying to write rspec tests for facts with multiple resolutions.
I know I can stub facts, and thus test all resolutions by targeting them
using the stubbed facts.
But how do I test a given resolution if the previous fails?
Or how do I test a given resolution when it was given an explicit weight
and no confine statements?
Example:
<code>
Facter.add(:foo) do
has_weight 100
setcode do
"bar"
end
end
Facter.add(:foo) do
has_weight 200
setcode do
nil
end
end
</code>
This fact should return "bar", but how do I test it in rspec?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/859a353a-a892-4443-a6eb-a4b53a270468%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.