~ubuntu-branches/ubuntu/quantal/puppet/quantal

« back to all changes in this revision

Viewing changes to spec/unit/parser/compiler_spec.rb

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-07-14 01:56:30 UTC
  • mfrom: (1.1.29) (3.1.43 sid)
  • Revision ID: package-import@ubuntu.com-20120714015630-ntj41rkvkq4zph4y
Tags: 2.7.18-1ubuntu1
* Resynchronise with Debian. (LP: #1023931) Remaining changes:
  - debian/puppetmaster-passenger.postinst: Make sure we error if puppet
    config print doesn't work
  - debian/puppetmaster-passenger.postinst: Ensure upgrades from
    <= 2.7.11-1 fixup passenger apache configuration.
* Dropped upstreamed patches:
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - debian/patches/puppet-12844
  - debian/patches/2.7.17-Puppet-July-2012-CVE-fixes.patch
* Drop Build-Depends on ruby-rspec (in universe):
  - debian/control: remove ruby-rspec from Build-Depends
  - debian/patches/no-rspec.patch: make Rakefile work anyway if rspec
    isn't installed so we can use it in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
741
741
 
742
742
      @compiler.send(:evaluate_ast_node)
743
743
    end
744
 
 
745
 
    it "should set the node's scope as the top scope" do
746
 
      node_resource = stub 'node resource', :ref => "Node[c]", :evaluate => nil, :type => "node"
747
 
      node_class = stub 'node', :name => "c", :ensure_in_catalog => node_resource
748
 
 
749
 
      @compiler.known_resource_types.stubs(:node).with("c").returns(node_class)
750
 
 
751
 
      # The #evaluate method normally does this.
752
 
      scope = stub 'scope', :source => "mysource"
753
 
      @compiler.topscope.expects(:class_scope).with(node_class).returns(scope)
754
 
      node_resource.stubs(:evaluate)
755
 
      @compiler.stubs :create_settings_scope
756
 
 
757
 
      @compiler.compile
758
 
 
759
 
      @compiler.topscope.should equal(scope)
760
 
    end
761
744
  end
762
745
 
763
746
  describe "when managing resource overrides" do