lib/gnawrnip/rspec.rb in gnawrnip-0.3.0 vs lib/gnawrnip/rspec.rb in gnawrnip-0.3.1

- old
+ new

@@ -3,14 +3,10 @@ RSpec.configure do |config| config.before(:all) do Gnawrnip.ready! end - config.after(:all) do - Gnawrnip.finish! - end - # https://github.com/jnicklas/capybara/blob/master/lib/capybara/rspec.rb fetch_current_example = RSpec.respond_to?(:current_example) ? proc { RSpec.current_example } : proc { |context| context.example } config.before(:each, turnip: true) do @@ -24,8 +20,12 @@ if example.exception Gnawrnip.photographer.take_shot screenshots = Gnawrnip.photographer.frames.compact example.metadata[:gnawrnip][:screenshot] = screenshots + else + Gnawrnip.photographer.frames.compact.each do |fp| + fp.close! + end end end end