Sha256: 08ae6384d5f5fb0b099807846fab90e5ddd9bab74ce4ce5879b43191d3f275ec
Contents?: true
Size: 663 Bytes
Versions: 13
Compression:
Stored size: 663 Bytes
Contents
# frozen_string_literal: true RSpec.configure do |config| config.around(:each, :singletons => lambda { |v| !!v }) do |example| config.rspeckled_logger.debug("Around Each - Start - #{__FILE__}") options = example.metadata[:singletons] options = options.is_a?(::TrueClass) ? described_class : options singletons_to_reset = Array(options) singletons_to_reset.each do |singleton| ::Singleton.__init__(singleton) end example.run singletons_to_reset.each do |singleton| ::Singleton.__init__(singleton) end config.rspeckled_logger.debug("Around Each - End - #{__FILE__}") end end
Version data entries
13 entries across 13 versions & 1 rubygems