diff options
| author | James Turnbull <james@lovedthanlost.net> | 2009-02-26 11:43:39 +1100 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-02-26 11:43:39 +1100 |
| commit | 5f73eb553fd083b558fb9553b0c07b6019d0ccee (patch) | |
| tree | 123ef2a9c7b8aa4e1cd52e6b98d0b3c53d626de6 /spec/unit | |
| parent | e40aea3c655e698d26c29370227b52c489e6db2b (diff) | |
| download | puppet-5f73eb553fd083b558fb9553b0c07b6019d0ccee.tar.gz puppet-5f73eb553fd083b558fb9553b0c07b6019d0ccee.tar.xz puppet-5f73eb553fd083b558fb9553b0c07b6019d0ccee.zip | |
Fixed #1849 - Ruby 1.9 portability: `when' doesn't like colons, replace with semicolons
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/provider/mount/parsed.rb | 2 | ||||
| -rw-r--r-- | spec/unit/type/file/selinux.rb | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/spec/unit/provider/mount/parsed.rb b/spec/unit/provider/mount/parsed.rb index 8a7b52531..d2c992f33 100755 --- a/spec/unit/provider/mount/parsed.rb +++ b/spec/unit/provider/mount/parsed.rb @@ -102,7 +102,7 @@ describe provider_class do # LAK:FIXME I can't mock Facter because this test happens at parse-time. it "should default to /etc/vfstab on Solaris and /etc/fstab everywhere else" do should = case Facter.value(:operatingsystem) - when "Solaris": "/etc/vfstab" + when "Solaris"; "/etc/vfstab" else "/etc/fstab" end diff --git a/spec/unit/type/file/selinux.rb b/spec/unit/type/file/selinux.rb index bf3315bf9..be58e636a 100644 --- a/spec/unit/type/file/selinux.rb +++ b/spec/unit/type/file/selinux.rb @@ -29,10 +29,10 @@ Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f @resource.expects(:stat).returns stat @sel.expects(:get_selinux_current_context).with("/my/file").returns "user_u:role_r:type_t:s0" expectedresult = case param - when :seluser then "user_u" - when :selrole then "role_r" - when :seltype then "type_t" - when :selrange then "s0" + when :seluser; "user_u" + when :selrole; "role_r" + when :seltype; "type_t" + when :selrange; "s0" end @sel.retrieve.should == expectedresult end @@ -42,10 +42,10 @@ Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f @resource.expects(:stat).returns stat @sel.expects(:get_selinux_current_context).with("/my/file").returns "user_u:role_r:type_t" expectedresult = case param - when :seluser then "user_u" - when :selrole then "role_r" - when :seltype then "type_t" - when :selrange then nil + when :seluser; "user_u" + when :selrole; "role_r" + when :seltype; "type_t" + when :selrange; nil end @sel.retrieve.should == expectedresult end @@ -59,10 +59,10 @@ Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f @sel.stubs(:debug) @sel.expects(:get_selinux_default_context).with("/my/file").returns "user_u:role_r:type_t:s0" expectedresult = case param - when :seluser then "user_u" - when :selrole then "role_r" - when :seltype then "type_t" - when :selrange then "s0" + when :seluser; "user_u" + when :selrole; "role_r" + when :seltype; "type_t" + when :selrange; "s0" end @sel.default.must == expectedresult end |
