summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-03-16 11:05:51 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-03-16 11:05:51 -0700
commitf8e5a31175eeffe52626c28c1bd928e48eec5eb2 (patch)
treebc6034f44dae2938f27ad874edd65f1cbac718ee
parent3fd1638f67ac2bcb23d304b1aa8bd452a74e0fb6 (diff)
downloadchef-lcg/nil-properties.tar.gz
fix spec that tested deprecations themselves using this warninglcg/nil-properties
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/integration/client/client_spec.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index 7a8059066a..2a31638c0f 100644
--- a/spec/integration/client/client_spec.rb
+++ b/spec/integration/client/client_spec.rb
@@ -388,18 +388,8 @@ EOM
when_the_repository "has a cookbook that generates deprecation warnings" do
before do
file "cookbooks/x/recipes/default.rb", <<-EOM
- class ::MyResource < Chef::Resource
- use_automatic_resource_name
- property :x, default: []
- property :y, default: {}
- end
-
- my_resource 'blah' do
- 1.upto(10) do
- x nil
- end
- x nil
- end
+ Chef.deprecated(:internal_api, "Test deprecation")
+ Chef.deprecated(:internal_api, "Test deprecation")
EOM
end
@@ -432,7 +422,7 @@ EOM
expect(run_complete).to be >= 0
# Make sure there is exactly one result for each, and that it occurs *after* the complete message.
- expect(match_indices(/An attempt was made to change x from \[\] to nil by calling x\(nil\). In Chef 12, this does a get rather than a set. In Chef 13, this will change to set the value to nil./, result.stdout)).to match([ be > run_complete ])
+ expect(match_indices(/Test deprecation/, result.stdout)).to match([ be > run_complete ])
end
end