summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/type/file_line_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/puppet/type/file_line_spec.rb')
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/type/file_line_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/puppet/type/file_line_spec.rb b/spec/unit/puppet/type/file_line_spec.rb
index 34d5dad..b85b9f4 100644..100755
--- a/spec/unit/puppet/type/file_line_spec.rb
+++ b/spec/unit/puppet/type/file_line_spec.rb
@@ -1,3 +1,4 @@
+#! /usr/bin/env ruby -S rspec
require 'spec_helper'
require 'tempfile'
describe Puppet::Type.type(:file_line) do
@@ -14,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(