summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-05-20 10:38:11 +0100
committerThom May <thom@chef.io>2016-05-20 10:38:11 +0100
commit3a854109bd0de5fbac8faff7eab0a54e44d7881e (patch)
tree1bb8c031df172bec61c0ffcbbeec5032d1f91352 /spec
parentcfab6de01fd596a03b60ce9c9dd59e4b7cb5aa48 (diff)
downloadchef-3a854109bd0de5fbac8faff7eab0a54e44d7881e.tar.gz
Ensure recipe-url works right in solotm/solo_fixes
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/application/solo_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/unit/application/solo_spec.rb b/spec/unit/application/solo_spec.rb
index 1c8ec2e11c..bb29261f5a 100644
--- a/spec/unit/application/solo_spec.rb
+++ b/spec/unit/application/solo_spec.rb
@@ -187,6 +187,31 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config
expect(Chef::Config[:local_mode]).to be_truthy
end
+ context "argv gets tidied up" do
+ before do
+ @original_argv = ARGV.dup
+ ARGV.clear
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
+ end
+
+ after do
+ ARGV.replace(@original_argv)
+ end
+
+ it "deletes --ez" do
+ ARGV << "--ez"
+ app.reconfigure
+ expect(ARGV.include?("--ez")).to be_falsey
+ end
+
+ it "replaces -r with --recipe-url" do
+ ARGV.push("-r", "http://junglist.gen.nz/recipes.tgz")
+ app.reconfigure
+ expect(ARGV.include?("-r")).to be_falsey
+ expect(ARGV.include?("--recipe-url")).to be_truthy
+ end
+ end
+
it "runs chef-client in local mode" do
allow(app).to receive(:setup_application).and_return(true)
allow(app).to receive(:run_application).and_return(true)