summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-07-28 20:49:48 -0700
committerPete Higgins <pete@peterhiggins.org>2020-07-29 17:18:05 -0700
commit018c9e9e16b6cc7cc7e7509b2b6aafed8b6c44c8 (patch)
tree63e856f0239559c5829a77229d2520c09ef7dee7
parentd3552628a9323ccc7da07b784d0dd49e7063132d (diff)
downloadchef-018c9e9e16b6cc7cc7e7509b2b6aafed8b6c44c8.tar.gz
Inline a shared context and remove it and DSL method.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r--spec/integration/knife/diff_spec.rb4
-rw-r--r--spec/integration/knife/download_spec.rb4
-rw-r--r--spec/integration/knife/upload_spec.rb4
-rw-r--r--spec/support/shared/integration/integration_helper.rb13
4 files changed, 9 insertions, 16 deletions
diff --git a/spec/integration/knife/diff_spec.rb b/spec/integration/knife/diff_spec.rb
index c56389727d..41ae5ea519 100644
--- a/spec/integration/knife/diff_spec.rb
+++ b/spec/integration/knife/diff_spec.rb
@@ -318,7 +318,9 @@ describe "knife diff", :workstation do
end
end # without versioned cookbooks
- with_versioned_cookbooks do
+ context "with versioned cookbooks" do
+ before { Chef::Config[:versioned_cookbooks] = true }
+
when_the_chef_server "has one of each thing" do
before do
client "x", "{}"
diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb
index ed63b6896a..7bdec7b356 100644
--- a/spec/integration/knife/download_spec.rb
+++ b/spec/integration/knife/download_spec.rb
@@ -594,7 +594,9 @@ describe "knife download", :workstation do
end
end # without versioned cookbooks
- with_versioned_cookbooks do
+ context "with versioned cookbooks" do
+ before { Chef::Config[:versioned_cookbooks] = true }
+
when_the_chef_server "has one of each thing" do
before do
client "x", {}
diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb
index dd539db507..37cfcefa32 100644
--- a/spec/integration/knife/upload_spec.rb
+++ b/spec/integration/knife/upload_spec.rb
@@ -800,7 +800,9 @@ describe "knife upload", :workstation do
end
end # without versioned cookbooks
- with_versioned_cookbooks do
+ context "with versioned cookbooks" do
+ before { Chef::Config[:versioned_cookbooks] = true }
+
when_the_chef_server "has one of each thing" do
before do
diff --git a/spec/support/shared/integration/integration_helper.rb b/spec/support/shared/integration/integration_helper.rb
index b10bcaf5ca..27233ff482 100644
--- a/spec/support/shared/integration/integration_helper.rb
+++ b/spec/support/shared/integration/integration_helper.rb
@@ -49,13 +49,6 @@ module IntegrationSupport
module_eval(&block)
end
end
-
- def with_versioned_cookbooks(&block)
- context("with versioned cookbooks") do
- include_context "with versioned cookbooks"
- module_eval(&block)
- end
- end
end
def api
@@ -132,10 +125,4 @@ module IntegrationSupport
end
end
-
- # Versioned cookbooks
-
- RSpec.shared_context "with versioned cookbooks", versioned_cookbooks: true do
- before(:each) { Chef::Config[:versioned_cookbooks] = true }
- end
end