spec/integration/recipes/default.rb in itamae-1.0.0.beta1 vs spec/integration/recipes/default.rb in itamae-1.0.0.beta2

- old
+ new

@@ -2,10 +2,50 @@ action :install end package 'sl' +###### + +execute "echo -n > /tmp/notifies" + +execute "echo -n 1 >> /tmp/notifies" do + action :nothing +end + +execute "echo -n 2 >> /tmp/notifies" do + notifies :run, "execute[echo -n 1 >> /tmp/notifies]" +end + +execute "echo -n 3 >> /tmp/notifies" do + action :nothing +end + +execute "echo -n 4 >> /tmp/notifies" do + notifies :run, "execute[echo -n 3 >> /tmp/notifies]", :immediately +end + +###### + +execute "echo -n > /tmp/subscribes" + +execute "echo -n 1 >> /tmp/subscribes" do + action :nothing + subscribes :run, "execute[echo -n 2 >> /tmp/subscribes]" +end + +execute "echo -n 2 >> /tmp/subscribes" + +execute "echo -n 3 >> /tmp/subscribes" do + action :nothing + subscribes :run, "execute[echo -n 4 >> /tmp/subscribes]", :immediately +end + +execute "echo -n 4 >> /tmp/subscribes" + +###### + remote_file "/tmp/remote_file" do source "hello.txt" end directory "/tmp/directory" do @@ -20,7 +60,16 @@ file "/tmp/file" do content "Hello World" end +execute "echo 'Hello Execute' > /tmp/execute" + +file "/tmp/never_exist1" do + only_if "exit 1" +end + +file "/tmp/never_exist2" do + not_if "exit 0" +end