summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burns <andrew@fetlife.com>2016-07-15 11:21:08 -0600
committerThom May <thom@chef.io>2016-11-10 12:02:11 +0000
commitfd5d5238c95d3d5d9a25812f91295805a90026cf (patch)
treeb7c72ebcedc2a3acf5f20e0a5f70da17ae5f728e
parent29ff4157f6144cc73967414cea60d7f426f00b91 (diff)
downloadchef-fd5d5238c95d3d5d9a25812f91295805a90026cf.tar.gz
Code style fixes; :lipstick:
-rw-r--r--lib/chef/resource/launchd.rb2
-rw-r--r--spec/unit/provider/launchd_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/launchd.rb b/lib/chef/resource/launchd.rb
index e4e8b4fb01..404da13665 100644
--- a/lib/chef/resource/launchd.rb
+++ b/lib/chef/resource/launchd.rb
@@ -68,7 +68,7 @@ class Chef
# Make sure the hashes don't have any incorrect keys/values
array.each do |entry|
- allowed_keys = %w(Minute Hour Day Weekday Month)
+ allowed_keys = %w{Minute Hour Day Weekday Month}
error_msg = "Invalid key for start_calendar_interval, must be one of: #{allowed_keys.join(", ")}"
if entry.keys.any? { |key| !allowed_keys.include?(key) }
raise Chef::Exceptions::ValidationFailed, error_msg
diff --git a/spec/unit/provider/launchd_spec.rb b/spec/unit/provider/launchd_spec.rb
index 3289e6a365..fa1323bfff 100644
--- a/spec/unit/provider/launchd_spec.rb
+++ b/spec/unit/provider/launchd_spec.rb
@@ -139,7 +139,7 @@ XML
it "should allow array of Hashes" do
allowed = (1..2).collect do |num|
{
- "Hour" => 10+num,
+ "Hour" => 10 + num,
"Weekday" => num,
}
end
@@ -162,7 +162,7 @@ XML
new_resource.time_out 300
new_resource.start_calendar_interval allowed
expect(provider.content?).to be_truthy
- %w(Minute Hour Day Weekday Month).each do |key|
+ %w{Minute Hour Day Weekday Month}.each do |key|
expect(provider.content).to include("<key>#{key}</key>")
end
end