Sha256: f6800fc3d94d932862102b5e5d8cb20afedbe495639a44814103d6bab4f6ac3f
Contents?: true
Size: 618 Bytes
Versions: 5
Compression:
Stored size: 618 Bytes
Contents
require 'rspec' RSpec.configure do |config| config.before(:all) do Gnawrnip.ready! end config.before(:each, turnip: true) do example = RSpec.current_example Gnawrnip.photographer.reset! example.metadata[:gnawrnip] = {} end config.after(:each, turnip: true) do example = RSpec.current_example 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
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
gnawrnip-0.8.0 | lib/gnawrnip/rspec.rb |
gnawrnip-0.7.0 | lib/gnawrnip/rspec.rb |
gnawrnip-0.6.0 | lib/gnawrnip/rspec.rb |
gnawrnip-0.5.0 | lib/gnawrnip/rspec.rb |
gnawrnip-0.4.0 | lib/gnawrnip/rspec.rb |