diff options
| author | Luke Kanies <luke@madstop.com> | 2009-08-18 18:14:19 -0700 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-08-24 11:38:19 +1000 |
| commit | 6fa9271a944f4167f82cb51affe1c0b795428b73 (patch) | |
| tree | f74716eb7c6dd4a1c6e3836d80bf4379625da665 /spec/unit/parser | |
| parent | c7526808c9d2d7efbcc39f33112001bd9bd42b56 (diff) | |
| download | puppet-6fa9271a944f4167f82cb51affe1c0b795428b73.tar.gz puppet-6fa9271a944f4167f82cb51affe1c0b795428b73.tar.xz puppet-6fa9271a944f4167f82cb51affe1c0b795428b73.zip | |
Fixing #2549 - autoloading of top-level classes works again
This was broken in the recent refactor around autoloading,
which didn't special-case classes that specified that they
were top-level.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/parser')
| -rwxr-xr-x | spec/unit/parser/parser.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/parser/parser.rb b/spec/unit/parser/parser.rb index ff14e205c..9127599df 100755 --- a/spec/unit/parser/parser.rb +++ b/spec/unit/parser/parser.rb @@ -387,6 +387,12 @@ describe Puppet::Parser do @parser.stubs(:load).returns(false) @parser.find_or_load("Bogus_namespace","Bogus_name",:my_type).should == false end + + it "should directly look for fully qualified classes" do + @loaded_code.stubs(:find_hostclass).with("foo_namespace","::foo_name").returns(false, true) + @parser.expects(:load).with("foo_name").returns true + @parser.find_or_load("foo_namespace","::foo_name",:hostclass) + end end end |
