diff options
author | Ashley Penney <ashley.penney@puppetlabs.com> | 2014-05-15 13:31:23 -0400 |
---|---|---|
committer | Ashley Penney <ashley.penney@puppetlabs.com> | 2014-05-15 13:31:23 -0400 |
commit | 8499ebdb7f892f2623295058649c67a5553d4732 (patch) | |
tree | 436a27d393345adb11b3d13a349257648b6f0813 /spec/unit/puppet/type/file_line_spec.rb | |
parent | 08b00d9229961d7b3c3cba997bfb35c8d47e4c4b (diff) | |
parent | 6eaa592cd8d5af097a4624b3d1cead74408aabf2 (diff) |
Merge pull request #256 from stbenjam/2571-before
(PUP-2571) add 'before' functionality to file_line
Diffstat (limited to 'spec/unit/puppet/type/file_line_spec.rb')
-rwxr-xr-x | spec/unit/puppet/type/file_line_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/puppet/type/file_line_spec.rb b/spec/unit/puppet/type/file_line_spec.rb index ab5b81b..b85b9f4 100755 --- a/spec/unit/puppet/type/file_line_spec.rb +++ b/spec/unit/puppet/type/file_line_spec.rb @@ -15,6 +15,14 @@ describe Puppet::Type.type(:file_line) do file_line[:match] = '^foo.*$' file_line[:match].should == '^foo.*$' end + it 'should accept an after regex' do + file_line[:after] = '^foo.*$' + file_line[:after].should == '^foo.*$' + end + it 'should accept a before regex' do + file_line[:before] = '^foo.*$' + file_line[:before].should == '^foo.*$' + end it 'should not accept a match regex that does not match the specified line' do expect { Puppet::Type.type(:file_line).new( |