summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/type/file_line_spec.rb
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-12-16 11:48:46 -0800
committerHunter Haugen <hunter@puppetlabs.com>2014-12-16 15:05:31 -0800
commitc6c203fca8da81fea96659bfe9618bb31965b837 (patch)
tree18d801ab4b6bc82b28f0bef283e69fd9a450ddbb /spec/unit/puppet/type/file_line_spec.rb
parent1493b212f24ef704f63b90fd6592b61c36cb3210 (diff)
Remove line match validation
The `match` attribute was validated to match `line`, except that in many cases (even the example given in the docs) a user would want to match a line entirely different from the new line. See comments on the original commit https://github.com/puppetlabs/puppetlabs-stdlib/commit/a06c0d8115892a74666676b50d4282df9850a119 and ask https://ask.puppetlabs.com/question/14366/file_line-resource-match-problems/ for further examples of confusion.
Diffstat (limited to 'spec/unit/puppet/type/file_line_spec.rb')
-rwxr-xr-xspec/unit/puppet/type/file_line_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/puppet/type/file_line_spec.rb b/spec/unit/puppet/type/file_line_spec.rb
index 9ef49ef..410d0bf 100755
--- a/spec/unit/puppet/type/file_line_spec.rb
+++ b/spec/unit/puppet/type/file_line_spec.rb
@@ -15,14 +15,14 @@ describe Puppet::Type.type(:file_line) do
file_line[:match] = '^foo.*$'
expect(file_line[:match]).to eq('^foo.*$')
end
- it 'should not accept a match regex that does not match the specified line' do
+ it 'should accept a match regex that does not match the specified line' do
expect {
Puppet::Type.type(:file_line).new(
:name => 'foo',
:path => '/my/path',
:line => 'foo=bar',
:match => '^bar=blah$'
- )}.to raise_error(Puppet::Error, /the value must be a regex that matches/)
+ )}.not_to raise_error
end
it 'should accept a match regex that does match the specified line' do
expect {