diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2011-05-07 17:45:15 +0200 |
|---|---|---|
| committer | Brice Figureau <brice-puppet@daysofwonder.com> | 2011-05-07 17:45:15 +0200 |
| commit | 5db214c486b82ef7cc7960831a44531f3892f3f6 (patch) | |
| tree | bd7f572e1ae033a35ae537aecb23a59ad7ddf651 /lib | |
| parent | 37225200eb39af65dc9eeabb7ae3e6e7571fa602 (diff) | |
| download | puppet-5db214c486b82ef7cc7960831a44531f3892f3f6.tar.gz puppet-5db214c486b82ef7cc7960831a44531f3892f3f6.tar.xz puppet-5db214c486b82ef7cc7960831a44531f3892f3f6.zip | |
Prevent spec failure caused by network device mock leak
We were leaking some mocks in the network device singleton from
tests to tests.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/util/network_device.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/util/network_device.rb b/lib/puppet/util/network_device.rb index d9c1aa34d..a650670ce 100644 --- a/lib/puppet/util/network_device.rb +++ b/lib/puppet/util/network_device.rb @@ -9,4 +9,9 @@ class Puppet::Util::NetworkDevice rescue => detail raise "Can't load #{device.provider} for #{device.name}: #{detail}" end + + # for tests reset + def self.clear + @current = nil + end end
\ No newline at end of file |
