diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2010-02-09 22:25:38 +0100 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | c694c4d34fea8b45695222321930e64b8991887a (patch) | |
| tree | 08640321e2e770b69fa44fb711fd206827103fe9 /spec/unit/parser/functions | |
| parent | 075f3c8df516bd52d412dc8d88fe194cf4edfb5b (diff) | |
| download | puppet-c694c4d34fea8b45695222321930e64b8991887a.tar.gz puppet-c694c4d34fea8b45695222321930e64b8991887a.tar.xz puppet-c694c4d34fea8b45695222321930e64b8991887a.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')
| -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 |
