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.4.0 spec/unit/application/facts_spec.rb
puppet-6.4.0-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-6.4.0-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-6.4.0-universal-darwin spec/unit/application/facts_spec.rb
puppet-6.0.7 spec/unit/application/facts_spec.rb
puppet-6.0.7-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-6.0.7-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-6.0.7-universal-darwin spec/unit/application/facts_spec.rb
puppet-5.5.12 spec/unit/application/facts_spec.rb
puppet-5.5.12-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.12-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-5.5.12-universal-darwin spec/unit/application/facts_spec.rb
puppet-6.3.0 spec/unit/application/facts_spec.rb
puppet-6.3.0-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-6.3.0-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-6.3.0-universal-darwin spec/unit/application/facts_spec.rb
puppet-6.2.0 spec/unit/application/facts_spec.rb
puppet-6.2.0-x86-mingw32 spec/unit/application/facts_spec.rb
puppet-6.2.0-x64-mingw32 spec/unit/application/facts_spec.rb
puppet-6.2.0-universal-darwin spec/unit/application/facts_spec.rb