diff options
Diffstat (limited to 'spec/unit/resource_spec.rb')
-rw-r--r-- | spec/unit/resource_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb index 2f002f144a..24cc5faea1 100644 --- a/spec/unit/resource_spec.rb +++ b/spec/unit/resource_spec.rb @@ -910,7 +910,14 @@ describe Chef::Resource do klz.provides :energy, platform: %w{autobots decepticons} end - it "adds mappings for all platforms" do + it "adds mappings for all platforms", ruby: "< 2.7" do + expect(Chef.resource_handler_map).to receive(:set).with( + :tape_deck, Chef::Resource::Klz, {} + ) + klz.provides :tape_deck + end + + it "adds mappings for all platforms", ruby: ">= 2.7" do expect(Chef.resource_handler_map).to receive(:set).with( :tape_deck, Chef::Resource::Klz ) |