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-6.0.5 spec/unit/application/facts_spec.rb
puppet-6.0.5-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-6.0.5-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-6.0.5-universal-darwin spec/unit/application/facts_spec.rb
puppet-5.5.10 spec/unit/application/facts_spec.rb
puppet-5.5.10-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.10-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.10-universal-darwin spec/unit/application/facts_spec.rb
puppet-6.1.0 spec/unit/application/facts_spec.rb
puppet-6.1.0-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-6.1.0-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-6.1.0-universal-darwin spec/unit/application/facts_spec.rb
puppet-6.0.4 spec/unit/application/facts_spec.rb
puppet-6.0.4-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-6.0.4-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-6.0.4-universal-darwin spec/unit/application/facts_spec.rb
puppet-5.5.8 spec/unit/application/facts_spec.rb
puppet-5.5.8-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.8-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.8-universal-darwin spec/unit/application/facts_spec.rb