Skip to content

Commit 8141497

Browse files
author
Christopher Thorn
committed
(maint) Fix resource_spec.rb test
Previously the test was creating a Puppet::Type 'test', and not removing the type at the end of the spec. This PR cleans up the name of the type, and removes it at the end of spec.
1 parent 49f2309 commit 8141497

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/integration/application/resource_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@
3030
it 'lists types from the default environment' do
3131
modulepath = File.join(Puppet[:codedir], 'modules', 'test', 'lib', 'puppet', 'type')
3232
FileUtils.mkdir_p(modulepath)
33-
File.write(File.join(modulepath, 'test.rb'), 'Puppet::Type.newtype(:test)')
33+
File.write(File.join(modulepath, 'test_resource_spec.rb'), 'Puppet::Type.newtype(:test_resource_spec)')
3434
resource.command_line.args = ['--types']
3535

3636
expect {
3737
resource.run
38-
}.to exit_with(0).and output(/test/).to_stdout
38+
}.to exit_with(0).and output(/test_resource_spec/).to_stdout
39+
ensure
40+
Puppet::Type.rmtype(:test_resource_spec)
3941
end
4042
end
4143

0 commit comments

Comments
 (0)