Sha256: 3ef5f94bfca1e5569d8e0942727604596f67f113e89833bad3618316c299bf30
Contents?: true
Size: 693 Bytes
Versions: 136
Compression:
Stored size: 693 Bytes
Contents
require 'spec_helper' require 'puppet/application/facts' describe Puppet::Application::Facts do before :each do allow(subject.command_line).to receive(:subcommand_name).and_return('facts') end it "should return facts if a key is given to find" do Puppet::Node::Facts.indirection.reset_terminus_class expect(Puppet::Node::Facts.indirection).to receive(:find).and_return(Puppet::Node::Facts.new('whatever', {})) allow(subject.command_line).to receive(:args).and_return(%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
136 entries across 136 versions & 1 rubygems