diff options
author | Stig Sandbeck Mathisen <ssm@debian.org> | 2014-09-07 10:14:36 +0200 |
---|---|---|
committer | Stig Sandbeck Mathisen <ssm@debian.org> | 2014-09-07 10:14:36 +0200 |
commit | d4b83be375ac1dead058e091191ee7c7b7c24c8a (patch) | |
tree | dc825687392ae3068de5b764be60c53122d9e02a /spec/unit/parser/functions/include_spec.rb | |
parent | 229cbb976fe0f70f5f30548b83517b415840f9bb (diff) | |
parent | 1681684857c6e39d60d87b0b3520d8783977ceff (diff) | |
download | puppet-upstream/3.7.0.tar.gz |
Imported Upstream version 3.7.0upstream/3.7.0
Diffstat (limited to 'spec/unit/parser/functions/include_spec.rb')
-rwxr-xr-x | spec/unit/parser/functions/include_spec.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/unit/parser/functions/include_spec.rb b/spec/unit/parser/functions/include_spec.rb index c1a5cbd5c..3fa0da35d 100755 --- a/spec/unit/parser/functions/include_spec.rb +++ b/spec/unit/parser/functions/include_spec.rb @@ -1,5 +1,6 @@ #! /usr/bin/env ruby require 'spec_helper' +require 'unit/parser/functions/shared' describe "the 'include' function" do before :all do @@ -46,6 +47,19 @@ describe "the 'include' function" do it "should raise if the class is not found" do @scope.stubs(:source).returns(true) - expect { @scope.function_include(["nosuchclass"]) }.to raise_error Puppet::Error + expect { @scope.function_include(["nosuchclass"]) }.to raise_error(Puppet::Error) + end + + describe "When the future parser is in use" do + require 'puppet/pops' + require 'puppet_spec/compiler' + include PuppetSpec::Compiler + + before(:each) do + Puppet[:parser] = 'future' + end + + it_should_behave_like 'all functions transforming relative to absolute names', :function_include + it_should_behave_like 'an inclusion function, regardless of the type of class reference,', :include end end |