summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBryan McLellan <btm@getchef.com>2014-09-03 14:35:54 -0700
committerBryan McLellan <btm@getchef.com>2014-09-03 14:35:54 -0700
commit2444d1ed86b2d3ba88e626a54f045f64b0cd51de (patch)
tree98a8bbacc6887e308a4c39b3bfa3a5a45fa86d2f /spec
parent3166bd959316c6fdb54455607332bf80e8eed147 (diff)
downloadchef-2444d1ed86b2d3ba88e626a54f045f64b0cd51de.tar.gz
Make Chef::Util::Powershell::Cmdlet Ruby 1.8.7 friendly
Use 1.8 hash syntax Explicitly convert the symbol to a string for comparison
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/util/powershell/cmdlet_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/util/powershell/cmdlet_spec.rb b/spec/unit/util/powershell/cmdlet_spec.rb
index a964f607c8..39b3585c17 100644
--- a/spec/unit/util/powershell/cmdlet_spec.rb
+++ b/spec/unit/util/powershell/cmdlet_spec.rb
@@ -80,27 +80,27 @@ describe Chef::Util::Powershell::Cmdlet do
end
it 'ignores switches with a false value' do
- @cmdlet.send(:command_switches_string, {foo: false}).should eql('')
+ @cmdlet.send(:command_switches_string, {:foo => false}).should eql('')
end
it 'should correctly handle a value type of string' do
- @cmdlet.send(:command_switches_string, {foo: 'bar'}).should eql("-foo 'bar'")
+ @cmdlet.send(:command_switches_string, {:foo => 'bar'}).should eql("-foo 'bar'")
end
it 'should correctly handle a value type of string even when it is 0 length' do
- @cmdlet.send(:command_switches_string, {foo: ''}).should eql("-foo ''")
+ @cmdlet.send(:command_switches_string, {:foo => ''}).should eql("-foo ''")
end
it 'should not quote integers' do
- @cmdlet.send(:command_switches_string, {foo: 1}).should eql("-foo 1")
+ @cmdlet.send(:command_switches_string, {:foo => 1}).should eql("-foo 1")
end
it 'should not quote floats' do
- @cmdlet.send(:command_switches_string, {foo: 1.0}).should eql("-foo 1.0")
+ @cmdlet.send(:command_switches_string, {:foo => 1.0}).should eql("-foo 1.0")
end
it 'has just the switch when the value is true' do
- @cmdlet.send(:command_switches_string, {foo: true}).should eql("-foo")
+ @cmdlet.send(:command_switches_string, {:foo => true}).should eql("-foo")
end
end
end