spec/converge_spec.rb in org-converge-0.0.16 vs spec/converge_spec.rb in org-converge-0.0.17
- old
+ new
@@ -172,9 +172,24 @@
success.should == true
result = File.open("#{example_dir}/subdir/out.log").read
result.should == "within subdir\n"
end
+ it "should be able to override chdir the process directory" do
+ example_dir = File.join(EXAMPLES_DIR, 'chdir')
+ setup_file = File.join(example_dir, 'override-dir.org')
+
+ o = OrgConverge::Command.new({
+ '<org_file>' => setup_file,
+ '--root-dir' => example_dir,
+ '--dir' => "subdir"
+ })
+ success = o.execute!
+ success.should == true
+ result = File.open("#{example_dir}/subdir/out.log").read
+ result.should == "within subdir\n"
+ end
+
it "should support idempotency checks via :if and :unless conditional clauses" do
example_dir = File.join(EXAMPLES_DIR, 'idempotency')
setup_file = File.join(example_dir, 'conditions.org')
o = OrgConverge::Command.new({