diff options
Diffstat (limited to 'spec/unit/parser')
-rw-r--r-- | spec/unit/parser/loaded_code.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/parser/loaded_code.rb b/spec/unit/parser/loaded_code.rb index 50f6b930c..d2986bf2c 100644 --- a/spec/unit/parser/loaded_code.rb +++ b/spec/unit/parser/loaded_code.rb @@ -25,6 +25,13 @@ describe Puppet::Parser::LoadedCode do it "should return nil when asked for a #{data} that has not been added" do Puppet::Parser::LoadedCode.new.send(data, "foo").should be_nil end + + it "should be able to retrieve all #{data}s" do + plurals = { "hostclass" => "hostclasses", "node" => "nodes", "definition" => "definitions" } + loader = Puppet::Parser::LoadedCode.new + loader.send("add_" + data , "foo", "bar") + loader.send(plurals[data]).should == { "foo" => "bar" } + end end describe "when finding a qualified instance" do |