Skip to content

Commit 74559e0

Browse files
committed
(maint) reset warning count after testing filtering
After each of those test, the `warning_count` was 100 and other tests for warnings would fail as they would have been swallowed.
1 parent 6448423 commit 74559e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/puppet/resource_api/type_definition_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@
119119
Puppet.settings[:strict] = strict_level
120120
end
121121

122+
after(:each) do
123+
Puppet::ResourceApi.warning_count = 0
124+
end
125+
122126
context 'when puppet strict is set to default (warning)' do
123127
it 'displays up to 100 warnings' do
124128
expect(Puppet).to receive(:warning).with(message).exactly(100).times
@@ -156,6 +160,10 @@
156160
Puppet.settings[:strict] = strict_level
157161
end
158162

163+
after(:each) do
164+
Puppet::ResourceApi.warning_count = 0
165+
end
166+
159167
context 'when puppet strict is set to default (warning)' do
160168
it 'displays up to 100 warnings' do
161169
expect(Puppet).to receive(:warning).with(message).exactly(100).times

0 commit comments

Comments
 (0)