summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/run_oc_pedant.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/run_oc_pedant.rb b/spec/run_oc_pedant.rb
index d874fb8..9c95b07 100644
--- a/spec/run_oc_pedant.rb
+++ b/spec/run_oc_pedant.rb
@@ -191,6 +191,15 @@ begin
Pedant.setup(pedant_args + pedant_args_from_env)
rspec_args = Pedant.config.rspec_args + rspec_args_from_env
+
+ if defined? Chef::ChefFS::FileSystemCache
+ RSpec.configure do |c|
+ c.before(:each) do
+ Chef::ChefFS::FileSystemCache.instance.reset!
+ end
+ end
+ end
+
result = RSpec::Core::Runner.run(rspec_args)
server.stop if server.running?