summaryrefslogtreecommitdiff
path: root/spec/unit/util/windows/registry_spec.rb
diff options
context:
space:
mode:
authorStig Sandbeck Mathisen <ssm@debian.org>2014-09-07 10:14:36 +0200
committerStig Sandbeck Mathisen <ssm@debian.org>2014-09-07 10:14:36 +0200
commitd4b83be375ac1dead058e091191ee7c7b7c24c8a (patch)
treedc825687392ae3068de5b764be60c53122d9e02a /spec/unit/util/windows/registry_spec.rb
parent229cbb976fe0f70f5f30548b83517b415840f9bb (diff)
parent1681684857c6e39d60d87b0b3520d8783977ceff (diff)
downloadpuppet-upstream/3.7.0.tar.gz
Imported Upstream version 3.7.0upstream/3.7.0
Diffstat (limited to 'spec/unit/util/windows/registry_spec.rb')
-rwxr-xr-xspec/unit/util/windows/registry_spec.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/unit/util/windows/registry_spec.rb b/spec/unit/util/windows/registry_spec.rb
index 636ba0c93..ed52539a5 100755
--- a/spec/unit/util/windows/registry_spec.rb
+++ b/spec/unit/util/windows/registry_spec.rb
@@ -1,7 +1,6 @@
#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/util/windows'
-require 'puppet/util/windows/registry'
describe Puppet::Util::Windows::Registry, :if => Puppet::Util::Platform.windows? do
subject do
@@ -43,12 +42,14 @@ describe Puppet::Util::Windows::Registry, :if => Puppet::Util::Platform.windows?
yielded.should == subkey
end
- [described_class::KEY64, described_class::KEY32].each do |access|
- it "should open the key for read access 0x#{access.to_s(16)}" do
- mode = described_class::KEY_READ | access
- hkey.expects(:open).with(path, mode)
+ if Puppet::Util::Platform.windows?
+ [described_class::KEY64, described_class::KEY32].each do |access|
+ it "should open the key for read access 0x#{access.to_s(16)}" do
+ mode = described_class::KEY_READ | access
+ hkey.expects(:open).with(path, mode)
- subject.open(name, path, mode) {|reg| }
+ subject.open(name, path, mode) {|reg| }
+ end
end
end