diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-04-13 11:12:45 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-04-13 11:12:45 -0700 |
commit | 3065f8ac6d6b0f61f034614e2303361590cc9e4f (patch) | |
tree | d7d2206ef4146f21a5a66404fe6e261517ca89b4 /spec/unit/dsl | |
parent | dd93333a3fc0851a0b63ec5bf63f67ce82ea4a21 (diff) | |
download | chef-3065f8ac6d6b0f61f034614e2303361590cc9e4f.tar.gz |
add test that methods wind up in important classes
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/dsl')
-rw-r--r-- | spec/unit/dsl/declare_resource_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/unit/dsl/declare_resource_spec.rb b/spec/unit/dsl/declare_resource_spec.rb index 57a7fd7f18..255e85e22e 100644 --- a/spec/unit/dsl/declare_resource_spec.rb +++ b/spec/unit/dsl/declare_resource_spec.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2018, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,6 +32,15 @@ describe Chef::ResourceCollection do Chef::Recipe.new("hjk", "test", run_context) end + describe "mixed in correctly" do + it "the resources() method winds up in the right classes" do + methods = [ :resources, :find_resource, :find_resource!, :edit_resource, :edit_resource!, :delete_resource, :delete_resource!, :declare_resource, :build_resource ] + expect(Chef::Resource.instance_methods).to include(*methods) + expect(Chef::Recipe.instance_methods).to include(*methods) + expect(Chef::Provider.instance_methods).to include(*methods) + end + end + describe "#declare_resource" do before do recipe.declare_resource(:zen_master, "monkey") do |