|
72 | 72 | expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path) }.to raise_error(Puppet::Error, %r{line is a required attribute})
|
73 | 73 | end
|
74 | 74 | it 'does not require that a line is specified when matching for absence' do
|
75 |
| - expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path, :ensure => :absent, :match_for_absence => :true, :match => 'match') }.not_to raise_error # rubocop:disable Lint/BooleanSymbol, Metrics/LineLength |
| 75 | + expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path, :ensure => :absent, :match_for_absence => :true, :match => 'match') }.not_to raise_error # rubocop:disable Metrics/LineLength |
76 | 76 | end
|
77 | 77 | it 'although if a line is specified anyway when matching for absence it still works and the line is silently ignored' do
|
78 |
| - expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path, :line => 'i_am_irrelevant', :ensure => :absent, :match_for_absence => :true, :match => 'match') }.not_to raise_error # rubocop:disable Lint/BooleanSymbol, Metrics/LineLength |
| 78 | + expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => tmp_path, :line => 'i_am_irrelevant', :ensure => :absent, :match_for_absence => :true, :match => 'match') }.not_to raise_error # rubocop:disable Metrics/LineLength |
79 | 79 | end
|
80 | 80 | it 'requires that a file is specified' do
|
81 | 81 | expect { Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'path') }.to raise_error(Puppet::Error, %r{path is a required attribute})
|
|
84 | 84 | expect(file_line[:ensure]).to eq :present
|
85 | 85 | end
|
86 | 86 | it 'defaults to replace => true' do
|
87 |
| - expect(file_line[:replace]).to eq :true # rubocop:disable Lint/BooleanSymbol |
| 87 | + expect(file_line[:replace]).to eq :true |
88 | 88 | end
|
89 | 89 | it 'defaults to encoding => UTF-8' do
|
90 | 90 | expect(file_line[:encoding]).to eq 'UTF-8'
|
|
0 commit comments