spec/integration/recipes/default.rb in itamae-1.2.17 vs spec/integration/recipes/default.rb in itamae-1.2.18

- old
+ new

@@ -297,5 +297,31 @@ action :edit block do |content| content.gsub!('world', 'Itamae') end end + +### + +unless run_command("echo -n Hello").stdout == "Hello" + raise "run_command in a recipe failed" +end + +define :run_command_in_definition do + unless run_command("echo -n Hello").stdout == "Hello" + raise "run_command in a definition failed" + end +end + +execute "echo Hello" do + unless run_command("echo -n Hello").stdout == "Hello" + raise "run_command in a resource failed" + end +end + +local_ruby_block 'execute run_command' do + block do + unless run_command("echo -n Hello").stdout == "Hello" + raise "run_command in local_ruby_block failed" + end + end +end