Sha256: 5d1920e6bb8abd521e46c121c1c072e51cb8d976fc4762a086d56408a17e5951
Contents?: true
Size: 1.39 KB
Versions: 14
Compression:
Stored size: 1.39 KB
Contents
# frozen_string_literal: true require 'spec_helper' require 'tempfile' describe 'support' do let(:output) do StringIO.new end let(:debugger) do PuppetDebugger::Cli.new(out_buffer: output) end let(:scope) do debugger.scope end let(:puppet_version) do debugger.puppet_lib_dir.scan(debugger.mod_finder).flatten.last end let(:manifest_file) do file = File.open('/tmp/debugger_puppet_manifest.pp', 'w') do |f| f.write(manifest_code) end '/tmp/debugger_puppet_manifest.pp' end let(:manifest_code) do <<-EOF file{'/tmp/test.txt': ensure => absent } \n notify{'hello_there':} \n service{'httpd': ensure => running}\n EOF end after(:each) do # manifest_file.close end it 'should return a puppet version' do expect(puppet_version).to match(/puppet-\d\.\d+.\d/) end it 'should return lib dirs' do expect(debugger.lib_dirs.count).to be >= 1 end it 'should return module dirs' do expect(debugger.modules_paths.count).to be >= 1 end it 'should return a list of default facts' do expect(debugger.default_facts.values).to be_instance_of(Hash) expect(debugger.default_facts.values['fqdn']).to eq('foo.example.com') end it 'should return a list of facts' do expect(debugger.node.facts.values).to be_instance_of(Hash) expect(debugger.node.facts.values['fqdn']).to eq('foo.example.com') end end
Version data entries
14 entries across 14 versions & 1 rubygems