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.5.1 spec/unit/application/facts_spec.rb
puppet-5.5.1-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.1-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.1-universal-darwin spec/unit/application/facts_spec.rb
puppet-4.10.11 spec/unit/application/facts_spec.rb
puppet-4.10.11-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-4.10.11-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-4.10.11-universal-darwin spec/unit/application/facts_spec.rb
puppet-5.3.6 spec/unit/application/facts_spec.rb
puppet-5.3.6-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.3.6-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.3.6-universal-darwin spec/unit/application/facts_spec.rb
puppet-5.5.0 spec/unit/application/facts_spec.rb
puppet-5.5.0-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.0-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.0-universal-darwin spec/unit/application/facts_spec.rb
puppet-5.4.0 spec/unit/application/facts_spec.rb
puppet-5.4.0-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.4.0-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.4.0-universal-darwin spec/unit/application/facts_spec.rb