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