summaryrefslogtreecommitdiff
path: root/spec/integration
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2017-04-05 11:56:25 -0700
committerGitHub <noreply@github.com>2017-04-05 11:56:25 -0700
commite85e77f24054df64ccd412cc9cedb9cba641706c (patch)
tree2cfff8b251b6f278f15911ae573cb132b92b7394 /spec/integration
parentf147f49999500379cc9200c9163631445be3a3ff (diff)
parent737bdca4a68c8abf66cec82bb7d1bb360a7ab18e (diff)
downloadchef-e85e77f24054df64ccd412cc9cedb9cba641706c.tar.gz
Merge pull request #6013 from coderanger/always-inline
Remove use_inline_resources
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/recipes/lwrp_inline_resources_spec.rb18
1 files changed, 7 insertions, 11 deletions
diff --git a/spec/integration/recipes/lwrp_inline_resources_spec.rb b/spec/integration/recipes/lwrp_inline_resources_spec.rb
index 65931d4764..54ce94f263 100644
--- a/spec/integration/recipes/lwrp_inline_resources_spec.rb
+++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb
@@ -19,14 +19,13 @@ describe "LWRPs with inline resources" do
let(:chef_client) { "ruby '#{chef_dir}/chef-client' --minimal-ohai" }
context "with a use_inline_resources provider with 'def action_a' instead of action :a" do
- class LwrpInlineResourcesTest < Chef::Resource::LWRPBase
+ class LwrpInlineResourcesTest < Chef::Resource
resource_name :lwrp_inline_resources_test
- actions :a, :nothing
+ allowed_actions :a, :nothing
default_action :a
property :ran_a
class Provider < Chef::Provider::LWRPBase
provides :lwrp_inline_resources_test
- use_inline_resources
def action_a
r = new_resource
ruby_block "run a" do
@@ -46,10 +45,10 @@ describe "LWRPs with inline resources" do
end
context "with an inline resource with a property that shadows the enclosing provider's property" do
- class LwrpShadowedPropertyTest < Chef::Resource::LWRPBase
+ class LwrpShadowedPropertyTest < Chef::Resource
PATH = ::File.join(Dir.tmpdir, "shadow-property.txt")
use_automatic_resource_name
- actions :fiddle
+ allowed_actions :fiddle
property :content
action :fiddle do
file PATH do
@@ -73,16 +72,14 @@ describe "LWRPs with inline resources" do
end
context "with an inline_resources provider with two actions, one calling the other" do
- class LwrpInlineResourcesTest2 < Chef::Resource::LWRPBase
+ class LwrpInlineResourcesTest2 < Chef::Resource
resource_name :lwrp_inline_resources_test2
- actions :a, :b, :nothing
+ allowed_actions :a, :b, :nothing
default_action :b
property :ran_a
property :ran_b
class Provider < Chef::Provider::LWRPBase
provides :lwrp_inline_resources_test2
- use_inline_resources
-
action :a do
r = new_resource
ruby_block "run a" do
@@ -133,8 +130,7 @@ describe "LWRPs with inline resources" do
default_action :create
EOM
file "providers/my_machine.rb", <<-EOM
- use_inline_resources
- action :create do
+ action :create do
x_do_nothing 'a'
x_do_nothing 'b'
end