summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-05-17 11:42:12 +0100
committerThom May <thom@chef.io>2016-06-22 12:09:28 +0100
commit848545b6038d05ea370ea69be783db1a881e9280 (patch)
treeffb8702b8d098f5ffc2bd0c73f98cd103b98a63e /spec/unit
parent996301a9d073207fa37eed4d83dfae57d4501168 (diff)
downloadchef-848545b6038d05ea370ea69be783db1a881e9280.tar.gz
Add most common knife commands to integration teststm/knife_integration_tests
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/knife/node_environment_set_spec.rb24
-rw-r--r--spec/unit/knife/node_run_list_set_spec.rb25
2 files changed, 0 insertions, 49 deletions
diff --git a/spec/unit/knife/node_environment_set_spec.rb b/spec/unit/knife/node_environment_set_spec.rb
index 03fc764fd8..7ceafdad78 100644
--- a/spec/unit/knife/node_environment_set_spec.rb
+++ b/spec/unit/knife/node_environment_set_spec.rb
@@ -52,29 +52,5 @@ describe Chef::Knife::NodeEnvironmentSet do
@knife.run
end
- describe "with no environment" do
- # Set up outputs for inspection later
- before(:each) do
- @stdout = StringIO.new
- @stderr = StringIO.new
-
- allow(@knife.ui).to receive(:stdout).and_return(@stdout)
- allow(@knife.ui).to receive(:stderr).and_return(@stderr)
- end
-
- it "should exit" do
- @knife.name_args = [ "adam" ]
- expect { @knife.run }.to raise_error SystemExit
- end
-
- it "should show the user the usage and an error" do
- @knife.name_args = [ "adam" ]
-
- begin ; @knife.run ; rescue SystemExit ; end
-
- expect(@stdout.string).to eq "USAGE: knife node environment set NODE ENVIRONMENT\n"
- expect(@stderr.string).to eq "FATAL: You must specify a node name and an environment.\n"
- end
- end
end
end
diff --git a/spec/unit/knife/node_run_list_set_spec.rb b/spec/unit/knife/node_run_list_set_spec.rb
index 1bbaa7d9a5..bd55edb997 100644
--- a/spec/unit/knife/node_run_list_set_spec.rb
+++ b/spec/unit/knife/node_run_list_set_spec.rb
@@ -111,30 +111,5 @@ describe Chef::Knife::NodeRunListSet do
end
end
- describe "with no role or recipe" do
- # Set up outputs for inspection later
- before(:each) do
- @stdout = StringIO.new
- @stderr = StringIO.new
-
- allow(@knife.ui).to receive(:stdout).and_return(@stdout)
- allow(@knife.ui).to receive(:stderr).and_return(@stderr)
- end
-
- it "should exit" do
- @knife.name_args = [ "adam" ]
- expect { @knife.run }.to raise_error SystemExit
- end
-
- it "should show the user" do
- @knife.name_args = [ "adam" ]
-
- begin ; @knife.run ; rescue SystemExit ; end
-
- expect(@stdout.string).to eq "USAGE: knife node run_list set NODE ENTRIES (options)\n"
- expect(@stderr.string).to eq "FATAL: You must supply both a node name and a run list.\n"
- end
- end
-
end
end