summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorTheodore Nordsieck <theo@opscode.com>2013-09-09 14:46:46 -0700
committerTheodore Nordsieck <theo@opscode.com>2013-09-11 16:13:23 -0700
commitec610d7d7a7e6bacbd44bd501d62d77cd039af8c (patch)
tree35f2cf0d9a8c9eb0a1916b62a973a234d0c291d4 /spec/spec_helper.rb
parent2b79939d5b046fb1141a83415ac782a13a6dbd99 (diff)
downloadohai-ec610d7d7a7e6bacbd44bd501d62d77cd039af8c.tar.gz
Converted plugins/solaris2/kernel to Mixlib::ShellOut.
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index cb541905..39db6136 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -53,12 +53,13 @@ end
# the mash variable may be an array listing multiple levels of Mash hierarchy
def it_should_check_from_deep_mash(plugin, mash, attribute, from, value)
it "should get the #{mash.inspect}[:#{attribute}] value from '#{from}'" do
- @plugin.should_receive(:from).with(from).and_return(value)
+ @plugin.should_receive(:shell_out).with(from).and_return(value)
@plugin.run
end
it "should set the #{mash.inspect}[:#{attribute}] to the value from '#{from}'" do
@plugin.run
+ value = value[1].split($/)[0]
if mash.is_a?(String)
@plugin[mash][attribute].should == value
elsif mash.is_a?(Array)