diff options
author | Josh Cooper <josh@puppet.com> | 2018-07-09 22:14:52 -0700 |
---|---|---|
committer | Josh Cooper <josh@puppet.com> | 2018-07-10 11:03:14 -0700 |
commit | 9bbbe87cba8a49cc68ce28f3ae6629b2e6b90d94 (patch) | |
tree | 2763c0b7d967bb90a148156807f5a1c61db983ed /spec/spec_helper_local.rb | |
parent | c8d6404fb8263691578cc731cc2b5978834cf626 (diff) | |
download | puppet-hosts_core-9bbbe87cba8a49cc68ce28f3ae6629b2e6b90d94.tar.gz puppet-hosts_core-9bbbe87cba8a49cc68ce28f3ae6629b2e6b90d94.tar.bz2 |
Actually delete tempfiles
Call cleanup after each test completes
The record_tmp method needs to record the files to be deleted in the
same class variable that the cleanup method uses.
Diffstat (limited to 'spec/spec_helper_local.rb')
-rw-r--r-- | spec/spec_helper_local.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb index 0fcc231..86c87f0 100644 --- a/spec/spec_helper_local.rb +++ b/spec/spec_helper_local.rb @@ -11,3 +11,9 @@ require 'puppet_spec/files' Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour| require behaviour.relative_path_from(Pathname.new(dir)) end + +RSpec.configure do |c| + c.after :each do + PuppetSpec::Files.cleanup + end +end |