diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-08-27 12:49:54 -0700 |
---|---|---|
committer | Jesse Wolfe <jes5199@gmail.com> | 2010-08-27 12:50:26 -0700 |
commit | 21afb51a1b84116b2a906a6959ae588f45135104 (patch) | |
tree | 48fa0438d0a50202194956344d0cf1f10b17b818 /spec/unit/parser/compiler_spec.rb | |
parent | 1f3070c4bc77b38e3dd6170cf6a58bee7ec337ac (diff) | |
parent | 8be1929043f4560bb17a4b06293b3f9a4efcfdbf (diff) | |
download | puppet-21afb51a1b84116b2a906a6959ae588f45135104.tar.gz puppet-21afb51a1b84116b2a906a6959ae588f45135104.tar.xz puppet-21afb51a1b84116b2a906a6959ae588f45135104.zip |
Merge commit '2.6.1rc3'
This synchronizes the 2.7 master branch with 2.6.1RC3
The 2.7 next branch has now diverged from master for the first time, as
if contains code that has not reached "release quality" status.
Diffstat (limited to 'spec/unit/parser/compiler_spec.rb')
-rwxr-xr-x | spec/unit/parser/compiler_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/unit/parser/compiler_spec.rb b/spec/unit/parser/compiler_spec.rb index e8c06dd0b..22d52f257 100755 --- a/spec/unit/parser/compiler_spec.rb +++ b/spec/unit/parser/compiler_spec.rb @@ -430,7 +430,18 @@ describe Puppet::Parser::Compiler do lambda { @compiler.add_resource(@scope, resource) }.should raise_error(ArgumentError) end - it "should add edges from the class resources to the main stage if no stage is specified" do + it "should add edges from the class resources to the parent's stage if no stage is specified" do + main = @compiler.catalog.resource(:stage, :main) + foo_stage = resource(:stage, :foo_stage) + @compiler.add_resource(@scope, foo_stage) + resource = resource(:class, "foo") + @scope.stubs(:resource).returns(:stage => :foo_stage) + @compiler.add_resource(@scope, resource) + + @compiler.catalog.should be_edge(foo_stage, resource) + end + + it "should add edges from top-level class resources to the main stage if no stage is specified" do main = @compiler.catalog.resource(:stage, :main) resource = resource(:class, "foo") @compiler.add_resource(@scope, resource) |