diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2010-02-09 22:25:38 +0100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2010-02-14 03:12:07 +1100 |
commit | 5aa596c99cac2e578860dc236ec99b908840518d (patch) | |
tree | b2f738b0dc7dd5ae9c949c173834194af1458733 /spec/unit/parser/functions/require.rb | |
parent | 3457b876a104e6ae20d570cd4cf235881d869aaf (diff) | |
download | puppet-5aa596c99cac2e578860dc236ec99b908840518d.tar.gz puppet-5aa596c99cac2e578860dc236ec99b908840518d.tar.xz puppet-5aa596c99cac2e578860dc236ec99b908840518d.zip |
Fix #3150 - require function doesn't like ::class syntax
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec/unit/parser/functions/require.rb')
-rwxr-xr-x | spec/unit/parser/functions/require.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/parser/functions/require.rb b/spec/unit/parser/functions/require.rb index 577a52a42..532c06900 100755 --- a/spec/unit/parser/functions/require.rb +++ b/spec/unit/parser/functions/require.rb @@ -13,6 +13,8 @@ describe "the require function" do @scope.stubs(:resource).returns @resource @scope.stubs(:findresource) @scope.stubs(:compiler).returns(@compiler) + @klass = stub 'class', :classname => "myclass" + @scope.stubs(:find_hostclass).returns(@klass) end it "should exist" do @@ -45,4 +47,13 @@ describe "the require function" do @scope.function_require("myclass") end + + it "should lookup the absolute class path" do + @scope.stubs(:function_include) + + @scope.expects(:find_hostclass).with("myclass").returns(@klass) + @klass.expects(:classname).returns("myclass") + + @scope.function_require("myclass") + end end |