Sha256: 1c8ff5618a6ce9d34eb757b05d6e03a1cabe8ccffc3fb955a9a676cb615d8e53
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
require_relative '../spec_helper.rb' require_relative '../../lib/puppet-check/rspec_puppet_support' require 'fileutils' describe RSpecPuppetSupport do after(:all) do # cleanup rspec_puppet_setup File.delete('spec/spec_helper.rb') %w[manifests modules].each { |dir| FileUtils.rm_r('spec/fixtures/' + dir) } end context '.run' do let(:rspec_puppet_setup) { RSpecPuppetSupport.run } before(:each) { Dir.chdir(fixtures_dir) } it 'creates missing directories, missing site.pp, missing symlinks, and a missing spec_helper' do if File.directory?('/home/travis') expect { rspec_puppet_setup }.to output("puppetlabs/gruntmaster has an unspecified, or specified but unsupported, download method.\n").to_stderr else expect { rspec_puppet_setup }.to output("subversion is not installed and cannot be used to retrieve dependency modules\npuppetlabs/gruntmaster has an unspecified, or specified but unsupported, download method.\n").to_stderr end # .file_setup expect(File.directory?('spec/fixtures/manifests')).to be true expect(File.directory?('spec/fixtures/modules')).to be true expect(File.file?('spec/fixtures/manifests/site.pp')).to be true expect(File.symlink?('spec/fixtures/modules/fixtures')).to be true expect(File.file?('spec/spec_helper.rb')).to be true # .dependency_setup expect(File.directory?('spec/fixtures/modules/puppetlabs-lvm')).to be true expect(File.directory?('spec/fixtures/modules/stdlib')).to be true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puppet-check-2.0.1 | spec/puppet-check/rspec_puppet_support_spec.rb |