Sha256: 507484542f1dec52d0153e45af948276166a01a0415e4fae6663ceaf005d59d2

Contents?: true

Size: 668 Bytes

Versions: 278

Compression:

Stored size: 668 Bytes

Contents

#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/application/facts'

describe Puppet::Application::Facts do
  before :each do
    subject.command_line.stubs(:subcommand_name).returns 'facts'
  end

  it "should return facts if a key is given to find" do
    Puppet::Node::Facts.indirection.reset_terminus_class
    Puppet::Node::Facts.indirection.expects(:find).returns(Puppet::Node::Facts.new('whatever', {}))
    subject.command_line.stubs(:args).returns %w{find whatever --render-as yaml}

    expect {
      expect {
        subject.run
      }.to exit_with(0)
    }.to have_printed(/object:Puppet::Node::Facts/)

    expect(@logs).to be_empty
  end
end

Version data entries

278 entries across 278 versions & 1 rubygems

Version Path
puppet-5.3.5 spec/unit/application/facts_spec.rb
puppet-5.3.5-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.3.5-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.3.5-universal-darwin spec/unit/application/facts_spec.rb
puppet-5.3.4 spec/unit/application/facts_spec.rb
puppet-5.3.4-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.3.4-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.3.4-universal-darwin spec/unit/application/facts_spec.rb
puppet-4.10.10 spec/unit/application/facts_spec.rb
puppet-4.10.10-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-4.10.10-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-4.10.10-universal-darwin spec/unit/application/facts_spec.rb
puppet-4.10.9 spec/unit/application/facts_spec.rb
puppet-4.10.9-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-4.10.9-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-4.10.9-universal-darwin spec/unit/application/facts_spec.rb
puppet-5.3.3 spec/unit/application/facts_spec.rb
puppet-5.3.3-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.3.3-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.3.3-universal-darwin spec/unit/application/facts_spec.rb