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/compiler_spec.rb | |
| parent | 229cbb976fe0f70f5f30548b83517b415840f9bb (diff) | |
| parent | 1681684857c6e39d60d87b0b3520d8783977ceff (diff) | |
| download | puppet-d4b83be375ac1dead058e091191ee7c7b7c24c8a.tar.gz | |
Imported Upstream version 3.7.0upstream/3.7.0
Diffstat (limited to 'spec/unit/parser/compiler_spec.rb')
| -rwxr-xr-x | spec/unit/parser/compiler_spec.rb | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/spec/unit/parser/compiler_spec.rb b/spec/unit/parser/compiler_spec.rb index d1e855a20..0ca01f521 100755 --- a/spec/unit/parser/compiler_spec.rb +++ b/spec/unit/parser/compiler_spec.rb @@ -97,6 +97,13 @@ describe Puppet::Parser::Compiler do      @compiler.environment.should equal(@node.environment)    end +  it "fails if the node's environment has conflicting manifest settings" do +    conflicted_environment = Puppet::Node::Environment.create(:testing, [], '/some/environment.conf/manifest.pp') +    conflicted_environment.stubs(:conflicting_manifest_settings?).returns(true) +    @node.environment = conflicted_environment +    expect { Puppet::Parser::Compiler.compile(@node) }.to raise_error(Puppet::Error, /disable_per_environment_manifest.*true.*environment.conf.*manifest.*conflict/) +  end +    it "should include the resource type collection helper" do      Puppet::Parser::Compiler.ancestors.should be_include(Puppet::Resource::TypeCollectionHelper)    end @@ -681,7 +688,7 @@ describe Puppet::Parser::Compiler do      it "should skip classes that have already been evaluated" do        @compiler.catalog.stubs(:tag) -      @scope.stubs(:class_scope).with(@class).returns("something") +      @scope.stubs(:class_scope).with(@class).returns(@scope)        @compiler.expects(:add_resource).never @@ -694,7 +701,7 @@ describe Puppet::Parser::Compiler do      it "should skip classes previously evaluated with different capitalization" do        @compiler.catalog.stubs(:tag)        @scope.stubs(:find_hostclass).with("MyClass",{:assume_fqname => false}).returns(@class) -      @scope.stubs(:class_scope).with(@class).returns("something") +      @scope.stubs(:class_scope).with(@class).returns(@scope)        @compiler.expects(:add_resource).never        @resource.expects(:evaluate).never        Puppet::Parser::Resource.expects(:new).never | 
