summaryrefslogtreecommitdiff
path: root/spec/unit/mixin
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-13 11:44:32 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-13 11:44:32 -0800
commitaf4afcc712d24dbc85a9c020a124acadeed295d2 (patch)
tree08a71e81175177fee945d09bb831d5ae37a24606 /spec/unit/mixin
parent1edd3dba71b4531bb1a570dd7e387620e8ee61de (diff)
downloadchef-af4afcc712d24dbc85a9c020a124acadeed295d2.tar.gz
autocorrecting Style/TrailingCommalcg/trailing_comma
chefstyle -a fixed 1044 occurrances
Diffstat (limited to 'spec/unit/mixin')
-rw-r--r--spec/unit/mixin/api_version_request_handling_spec.rb2
-rw-r--r--spec/unit/mixin/params_validate_spec.rb56
-rw-r--r--spec/unit/mixin/powershell_out_spec.rb8
-rw-r--r--spec/unit/mixin/shell_out_spec.rb18
4 files changed, 42 insertions, 42 deletions
diff --git a/spec/unit/mixin/api_version_request_handling_spec.rb b/spec/unit/mixin/api_version_request_handling_spec.rb
index cc5340e424..fc42d76d72 100644
--- a/spec/unit/mixin/api_version_request_handling_spec.rb
+++ b/spec/unit/mixin/api_version_request_handling_spec.rb
@@ -54,7 +54,7 @@ describe Chef::Mixin::ApiVersionRequestHandling do
let(:return_hash) {
{
"min_version" => min_server_version,
- "max_version" => max_server_version
+ "max_version" => max_server_version,
}
}
diff --git a/spec/unit/mixin/params_validate_spec.rb b/spec/unit/mixin/params_validate_spec.rb
index 3724bbf583..99d5230a75 100644
--- a/spec/unit/mixin/params_validate_spec.rb
+++ b/spec/unit/mixin/params_validate_spec.rb
@@ -63,7 +63,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:kind_of => String
}
- }
+ },
)
}.not_to raise_error
@@ -74,7 +74,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:kind_of => Array
}
- }
+ },
)
}.to raise_error(ArgumentError)
end
@@ -87,7 +87,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:required => true
}
- }
+ },
)
}.not_to raise_error
@@ -98,7 +98,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:required => true
}
- }
+ },
)
}.to raise_error(ArgumentError)
@@ -109,7 +109,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:required => false
}
- }
+ },
)
}.not_to raise_error
end
@@ -122,7 +122,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:respond_to => "validate"
}
- }
+ },
)
}.not_to raise_error
@@ -133,7 +133,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:respond_to => "monkey"
}
- }
+ },
)
}.to raise_error(ArgumentError)
end
@@ -146,7 +146,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:respond_to => ["validate", "music"]
}
- }
+ },
)
}.not_to raise_error
@@ -157,7 +157,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:respond_to => ["monkey", "validate"]
}
- }
+ },
)
}.to raise_error(ArgumentError)
end
@@ -168,7 +168,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:default => "is the loneliest number"
}
- })
+ },)
expect(arguments[:one]).to eq("is the loneliest number")
end
@@ -180,7 +180,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:regex => /^is good$/
}
- }
+ },
)
}.not_to raise_error
@@ -191,7 +191,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:regex => /^is bad$/
}
- }
+ },
)
}.to raise_error(ArgumentError)
end
@@ -205,10 +205,10 @@ describe Chef::Mixin::ParamsValidate do
:callbacks => {
"should be equal to is good" => lambda { |a|
a == "is good"
- },
+ }
}
}
- }
+ },
)
}.not_to raise_error
@@ -220,10 +220,10 @@ describe Chef::Mixin::ParamsValidate do
:callbacks => {
"should be equal to 'is good'" => lambda { |a|
a == "is good"
- },
+ }
}
}
- }
+ },
)
}.to raise_error(ArgumentError)
end
@@ -243,14 +243,14 @@ describe Chef::Mixin::ParamsValidate do
a == "is good"
}
},
- :required => true
+ :required => true,
},
:two => {
:kind_of => String,
- :required => false
+ :required => false,
},
- :three => { :default => "neato mosquito" }
- }
+ :three => { :default => "neato mosquito" },
+ },
)
}.not_to raise_error
expect(args[:three]).to eq("neato mosquito")
@@ -267,14 +267,14 @@ describe Chef::Mixin::ParamsValidate do
a == "is good"
}
},
- :required => true
+ :required => true,
},
:two => {
:kind_of => Hash,
- :required => false
+ :required => false,
},
- :three => { :default => "neato mosquito" }
- }
+ :three => { :default => "neato mosquito" },
+ },
)
}.to raise_error(ArgumentError)
end
@@ -286,7 +286,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:busted => "check"
}
- }
+ },
)
}.to raise_error(ArgumentError)
end
@@ -305,7 +305,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:kind_of => [ String, Array ]
}
- }
+ },
)
}.not_to raise_error
expect {
@@ -315,7 +315,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:kind_of => [ String, Array ]
}
- }
+ },
)
}.not_to raise_error
expect {
@@ -325,7 +325,7 @@ describe Chef::Mixin::ParamsValidate do
:one => {
:kind_of => [ String, Array ]
}
- }
+ },
)
}.to raise_error(ArgumentError)
end
diff --git a/spec/unit/mixin/powershell_out_spec.rb b/spec/unit/mixin/powershell_out_spec.rb
index 0fede582fa..79faf8127d 100644
--- a/spec/unit/mixin/powershell_out_spec.rb
+++ b/spec/unit/mixin/powershell_out_spec.rb
@@ -31,7 +31,7 @@ describe Chef::Mixin::PowershellOut do
ret = double("Mixlib::ShellOut")
expect(object).to receive(:shell_out).with(
"powershell.exe #{flags} -Command \"Get-Process\"",
- {}
+ {},
).and_return(ret)
expect(object.powershell_out("Get-Process")).to eql(ret)
end
@@ -40,7 +40,7 @@ describe Chef::Mixin::PowershellOut do
ret = double("Mixlib::ShellOut")
expect(object).to receive(:shell_out).with(
"powershell.exe #{flags} -Command \"Get-Process\"",
- timeout: 600
+ timeout: 600,
).and_return(ret)
expect(object.powershell_out("Get-Process", timeout: 600)).to eql(ret)
end
@@ -51,7 +51,7 @@ describe Chef::Mixin::PowershellOut do
mixlib_shellout = double("Mixlib::ShellOut")
expect(object).to receive(:shell_out).with(
"powershell.exe #{flags} -Command \"Get-Process\"",
- {}
+ {},
).and_return(mixlib_shellout)
expect(mixlib_shellout).to receive(:error!)
expect(object.powershell_out!("Get-Process")).to eql(mixlib_shellout)
@@ -61,7 +61,7 @@ describe Chef::Mixin::PowershellOut do
mixlib_shellout = double("Mixlib::ShellOut")
expect(object).to receive(:shell_out).with(
"powershell.exe #{flags} -Command \"Get-Process\"",
- timeout: 600
+ timeout: 600,
).and_return(mixlib_shellout)
expect(mixlib_shellout).to receive(:error!)
expect(object.powershell_out!("Get-Process", timeout: 600)).to eql(mixlib_shellout)
diff --git a/spec/unit/mixin/shell_out_spec.rb b/spec/unit/mixin/shell_out_spec.rb
index beaf624ddb..c22d45e5fd 100644
--- a/spec/unit/mixin/shell_out_spec.rb
+++ b/spec/unit/mixin/shell_out_spec.rb
@@ -143,8 +143,8 @@ describe Chef::Mixin::ShellOut do
'LC_ALL' => Chef::Config[:internal_locale],
'LANG' => Chef::Config[:internal_locale],
'LANGUAGE' => Chef::Config[:internal_locale],
- },
- }).and_return(true)
+ }
+ },).and_return(true)
shell_out_obj.shell_out(cmd, options)
end
@@ -156,8 +156,8 @@ describe Chef::Mixin::ShellOut do
'LC_ALL' => Chef::Config[:internal_locale],
'LANG' => Chef::Config[:internal_locale],
'LANGUAGE' => Chef::Config[:internal_locale],
- },
- }).and_return(true)
+ }
+ },).and_return(true)
shell_out_obj.shell_out(cmd, options)
expect(options[:environment].has_key?('LC_ALL')).to be false
end
@@ -185,7 +185,7 @@ describe Chef::Mixin::ShellOut do
'LANG' => Chef::Config[:internal_locale],
'LANGUAGE' => Chef::Config[:internal_locale],
}
- }).and_return(true)
+ },).and_return(true)
shell_out_obj.shell_out(cmd, options)
end
@@ -198,7 +198,7 @@ describe Chef::Mixin::ShellOut do
'LANG' => Chef::Config[:internal_locale],
'LANGUAGE' => Chef::Config[:internal_locale],
}
- }).and_return(true)
+ },).and_return(true)
shell_out_obj.shell_out(cmd, options)
expect(options[:env].has_key?('LC_ALL')).to be false
end
@@ -214,7 +214,7 @@ describe Chef::Mixin::ShellOut do
'LANG' => Chef::Config[:internal_locale],
'LANGUAGE' => Chef::Config[:internal_locale],
},
- }).and_return(true)
+ },).and_return(true)
shell_out_obj.shell_out(cmd, options)
end
end
@@ -227,8 +227,8 @@ describe Chef::Mixin::ShellOut do
'LC_ALL' => Chef::Config[:internal_locale],
'LANG' => Chef::Config[:internal_locale],
'LANGUAGE' => Chef::Config[:internal_locale],
- },
- }).and_return(true)
+ }
+ },).and_return(true)
shell_out_obj.shell_out(cmd)
end
end