Skip to content

Commit 057286b

Browse files
committed
Rename test file
1 parent bb1c53b commit 057286b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require 'minitest_helper'
2+
require 'plugins/pre_commit/checks/puppet'
3+
4+
describe PreCommit::Checks::Puppet do
5+
let(:check){ PreCommit::Checks::Puppet.new(nil, nil, []) }
6+
7+
it "succeeds if nothing changed" do
8+
check.call([]).must_equal nil
9+
end
10+
11+
it "succeeds if non-php file changed" do
12+
check.call([fixture_file('bad-puppet.js')]).must_equal nil
13+
end
14+
15+
it "succeeds if only good changes" do
16+
check.call([fixture_file("good.pp")]).must_equal nil
17+
end
18+
19+
it "fails if script fails" do
20+
check.call([fixture_file("bad.pp")]).must_match(/Parse error/i)
21+
end
22+
end

0 commit comments

Comments
 (0)