summaryrefslogtreecommitdiffstats
path: root/spec/unit/util
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-04-21 11:29:05 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-04-21 11:36:27 -0700
commitc3a76a98226866fe691d0c6cb3995ec08af799e5 (patch)
treef55a4f9acc1e1aa1854fd0993a998405520bf700 /spec/unit/util
parent7bd6a2f37beda001c83b666900df436a33cfccb1 (diff)
downloadpuppet-c3a76a98226866fe691d0c6cb3995ec08af799e5.tar.gz
puppet-c3a76a98226866fe691d0c6cb3995ec08af799e5.tar.xz
puppet-c3a76a98226866fe691d0c6cb3995ec08af799e5.zip
(#7021) Fix order dependent spec failures
Running: rspec spec/unit/util/network_device_spec.rb spec/integration/transaction_spec.rb Caused Mocha::ExpectationError: unexpected invocation: #<Mock:device>.command() The NetworkDevice class had a current reader that once set, never got unset and lived between tests. Paired-with: Josh Cooper <josh@puppetlabs.com>
Diffstat (limited to 'spec/unit/util')
-rw-r--r--spec/unit/util/network_device_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/util/network_device_spec.rb b/spec/unit/util/network_device_spec.rb
index 70cb509b4..0f7c6036b 100644
--- a/spec/unit/util/network_device_spec.rb
+++ b/spec/unit/util/network_device_spec.rb
@@ -10,6 +10,10 @@ describe Puppet::Util::NetworkDevice do
@device = OpenStruct.new(:name => "name", :provider => "test")
end
+ after(:each) do
+ Puppet::Util::NetworkDevice.teardown
+ end
+
class Puppet::Util::NetworkDevice::Test
class Device
def initialize(device)
@@ -43,4 +47,4 @@ describe Puppet::Util::NetworkDevice do
Puppet::Util::NetworkDevice.current.should == device
end
end
-end \ No newline at end of file
+end