summaryrefslogtreecommitdiff
path: root/spec/support/lib
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-01-23 15:25:49 -0800
committerdanielsdeleo <dan@opscode.com>2013-01-23 15:25:49 -0800
commit9c95cb722a44440830cfc4da1c57f4815dafe904 (patch)
treecba364d6a568a5d33baea3bbb6ee07d6f7f98ed4 /spec/support/lib
parent53fa8088240f19a1dfc589d9ba07098cbdd9bba2 (diff)
downloadchef-9c95cb722a44440830cfc4da1c57f4815dafe904.tar.gz
remove cruft code.
In all of github there is not a single cookbook using this.
Diffstat (limited to 'spec/support/lib')
-rw-r--r--spec/support/lib/chef/resource/cat.rb8
-rw-r--r--spec/support/lib/chef/resource/one_two_three_four.rb18
-rw-r--r--spec/support/lib/chef/resource/zen_master.rb18
3 files changed, 19 insertions, 25 deletions
diff --git a/spec/support/lib/chef/resource/cat.rb b/spec/support/lib/chef/resource/cat.rb
index 5809ad3275..83eb9f08a3 100644
--- a/spec/support/lib/chef/resource/cat.rb
+++ b/spec/support/lib/chef/resource/cat.rb
@@ -29,12 +29,10 @@ class Chef
end
def pretty_kitty(arg=nil)
- set_if_args(@pretty_kitty, arg) do
- case arg
- when true, false
- @pretty_kitty = arg
- end
+ if arg == true or arg == false
+ @pretty_kitty = arg
end
+ @pretty_kitty
end
end
end
diff --git a/spec/support/lib/chef/resource/one_two_three_four.rb b/spec/support/lib/chef/resource/one_two_three_four.rb
index 4f4b063eb6..296d2cd970 100644
--- a/spec/support/lib/chef/resource/one_two_three_four.rb
+++ b/spec/support/lib/chef/resource/one_two_three_four.rb
@@ -6,9 +6,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,23 +20,21 @@ class Chef
class Resource
class OneTwoThreeFour < Chef::Resource
attr_reader :i_can_count
-
+
def initialize(name, run_context)
@resource_name = :one_two_three_four
super
end
-
+
def i_can_count(tf)
@i_can_count = tf
end
-
+
def something(arg=nil)
- set_if_args(@something, arg) do
- case arg
- when true, false
- @something = arg
- end
+ if arg == true or arg == false
+ @something = arg
end
+ @something
end
end
end
diff --git a/spec/support/lib/chef/resource/zen_master.rb b/spec/support/lib/chef/resource/zen_master.rb
index 71842b74c0..7a7076ca4b 100644
--- a/spec/support/lib/chef/resource/zen_master.rb
+++ b/spec/support/lib/chef/resource/zen_master.rb
@@ -6,9 +6,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,23 +23,21 @@ class Chef
class Resource
class ZenMaster < Chef::Resource
attr_reader :peace
-
+
def initialize(name, run_context=nil)
@resource_name = :zen_master
super
end
-
+
def peace(tf)
@peace = tf
end
-
+
def something(arg=nil)
- set_if_args(@something, arg) do
- case arg
- when true, false
- @something = arg
- end
+ if arg == true or arg == false
+ @something = arg
end
+ @something
end
end
end