summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppet.com>2016-10-07 11:58:12 +0100
committerGitHub <noreply@github.com>2016-10-07 11:58:12 +0100
commite7825bc9dd0c33c986fcdc5e6dfd11c6cded8ca1 (patch)
treea2c2689d612e142f821492fda11ef4e9a55e204a /spec
parentc046716de30c55662cff0d11efa573f0d572d984 (diff)
parentbcab71ded8507de4fd9f89b4dcf798b3d98ace59 (diff)
Merge pull request #666 from HAIL9000/issue/master/MODULES-3590_fix_match_for_absence_parameter
(MODULES-3590) Fix match_for_absence parameter
Diffstat (limited to 'spec')
-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")