Skip to content

Commit ec60720

Browse files
authored
Merge pull request #188 from da-ar/master-1.6.x-mergeup
(FM-8265) Merge branch '1.6.x' into master
2 parents d8f5330 + 65c69ef commit ec60720

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

.rspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
--format documentation
22
--color
3-
--order rand
3+
--order rand

spec/puppet/resource_api/base_type_definition_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@
131131
Puppet.settings[:strict] = strict_level
132132
end
133133

134+
after(:each) do
135+
Puppet::ResourceApi.warning_count = 0
136+
end
137+
134138
context 'when puppet strict is set to default (warning)' do
135139
it 'displays up to 100 warnings' do
136140
expect(Puppet).to receive(:warning).with(message).exactly(100).times
@@ -168,6 +172,10 @@
168172
Puppet.settings[:strict] = strict_level
169173
end
170174

175+
after(:each) do
176+
Puppet::ResourceApi.warning_count = 0
177+
end
178+
171179
context 'when puppet strict is set to default (warning)' do
172180
it 'displays up to 100 warnings' do
173181
expect(Puppet).to receive(:warning).with(message).exactly(100).times

spec/puppet/resource_api_spec.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,22 +1802,22 @@ def set(_context, changes) end
18021802

18031803
it { expect { described_class.register_type(definition) }.not_to raise_error }
18041804

1805-
it 'is seen as a supported feature' do
1806-
expect(Puppet).not_to receive(:warning).with(%r{Unknown feature detected:.*simple_test_filter})
1807-
expect { described_class.register_type(definition) }.not_to raise_error
1808-
end
1805+
context 'with the type registered' do
1806+
it 'is seen as a supported feature' do
1807+
expect(Puppet).not_to receive(:warning).with(%r{Unknown feature detected:.*simple_test_filter})
1808+
expect { described_class.register_type(definition) }.not_to raise_error
1809+
end
18091810

1810-
it 'passes through the an empty array to `get`' do
1811-
expect { described_class.register_type(definition) }.not_to raise_error
1812-
expect(provider).to receive(:get).with(anything, []).and_return([])
1813-
type.instances
1814-
end
1811+
it 'passes through the an empty array to `get`' do
1812+
expect(provider).to receive(:get).with(anything, []).and_return([])
1813+
type.instances
1814+
end
18151815

1816-
it 'passes through the resource title to `get`' do
1817-
expect { described_class.register_type(definition) }.not_to raise_error
1818-
instance = type.new(name: 'bar', ensure: 'present')
1819-
expect(provider).to receive(:get).with(anything, ['bar']).and_return([])
1820-
instance.retrieve
1816+
it 'passes through the resource title to `get`' do
1817+
instance = type.new(name: 'bar', ensure: 'present')
1818+
expect(provider).to receive(:get).with(anything, ['bar']).and_return([])
1819+
instance.retrieve
1820+
end
18211821
end
18221822
end
18231823

0 commit comments

Comments
 (0)