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

« back to all changes in this revision

Viewing changes to spec/unit/indirector/resource/ral_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:
20
20
 
21
21
    it "if there is no instance, it should create one", :'fails_on_ruby_1.9.2' => true do
22
22
      wrong_instance = stub "wrong user", :name => "bob"
 
23
      root = mock "Root User"
 
24
      root_resource = mock "Root Resource"
23
25
 
24
26
      require 'puppet/type/user'
25
27
      Puppet::Type::User.expects(:instances).returns([ wrong_instance, wrong_instance ])
 
28
      Puppet::Type::User.expects(:new).with(has_entry(:name => "root")).returns(root)
 
29
      root.expects(:to_resource).returns(root_resource)
 
30
 
26
31
      result = Puppet::Resource::Ral.new.find(@request)
27
 
      result.should be_is_a(Puppet::Resource)
28
 
      result.title.should == "root"
 
32
 
 
33
      result.should == root_resource
29
34
    end
30
35
  end
31
36