summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorAndrew Shafer <andrew@reductivelabs.com>2008-12-07 22:41:45 -0700
committerAndrew Shafer <andrew@reductivelabs.com>2008-12-08 00:07:54 -0700
commit7e2da7eeb25bb8879af40f12c4a04047a159374e (patch)
tree2dbc7e7762355791c4d38b5b14bc9fe28d67bf6b /spec
parent8616d74b47ac9177a3f29f1ebf63902bdefb3275 (diff)
downloadpuppet-7e2da7eeb25bb8879af40f12c4a04047a159374e.tar.gz
puppet-7e2da7eeb25bb8879af40f12c4a04047a159374e.tar.xz
puppet-7e2da7eeb25bb8879af40f12c4a04047a159374e.zip
Refactor #1802 Use 'zfs get -H -o value' instead of parsing output for value
just simplifying code
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/provider/zfs/solaris.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/zfs/solaris.rb b/spec/unit/provider/zfs/solaris.rb
index 63aefcdc4..9189e44f0 100755
--- a/spec/unit/provider/zfs/solaris.rb
+++ b/spec/unit/provider/zfs/solaris.rb
@@ -66,12 +66,12 @@ describe provider_class do
[:mountpoint, :compression, :copies, :quota, :reservation, :sharenfs, :snapdir].each do |prop|
describe "when getting the #{prop} value" do
it "should call zfs with :get, #{prop} and this zfs" do
- @provider.expects(:zfs).with(:get, prop, @resource[:name]).returns("NAME PROPERTY VALUE SOURCE\nmyzfs name value blah")
+ @provider.expects(:zfs).with(:get, "-H", "-o", "value", prop, @resource[:name]).returns("value\n")
@provider.send(prop)
end
it "should get the third value of the second line from the output" do
- @provider.stubs(:zfs).with(:get, prop, @resource[:name]).returns("NAME PROPERTY VALUE SOURCE\nmyzfs name value blah")
+ @provider.stubs(:zfs).with(:get, "-H", "-o", "value", prop, @resource[:name]).returns("value\n")
@provider.send(prop).should == "value"
end
end