summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/puppet/provider')
-rwxr-xr-xspec/unit/puppet/provider/file_line/ruby_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/puppet/provider/file_line/ruby_spec.rb b/spec/unit/puppet/provider/file_line/ruby_spec.rb
index fdeaf1a..1f41f62 100755
--- a/spec/unit/puppet/provider/file_line/ruby_spec.rb
+++ b/spec/unit/puppet/provider/file_line/ruby_spec.rb
@@ -363,6 +363,13 @@ describe provider_class do
@provider = provider_class.new(@resource)
end
+ it 'should find a line to match' do
+ File.open(@tmpfile, 'w') do |fh|
+ fh.write("foo1\nfoo\nfoo2")
+ end
+ expect(@provider.exists?).to be_truthy
+ end
+
it 'should remove one line if it matches' do
File.open(@tmpfile, 'w') do |fh|
fh.write("foo1\nfoo\nfoo2")