Sha256: 1f0393619a24b1ffd0cad6b21e2bfe4a919561bb21a1eddfff53286e279979d3

Contents?: true

Size: 631 Bytes

Versions: 14

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2018-2023, by Samuel Williams.

require_relative 'config'
require 'rspec/core/formatters'

$covered = Covered::Config.load

module Covered
	module RSpec
		module Policy
			def load_spec_files
				$covered.start
				
				super
			end
			
			def covered
				$covered
			end
			
			def covered= policy
				$covered = policy
			end
		end
	end
end

if $covered.record?
	RSpec::Core::Configuration.prepend(Covered::RSpec::Policy)

	RSpec.configure do |config|
		config.after(:suite) do
			$covered.finish
			$covered.call(config.output_stream)
		end
	end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
covered-0.26.0 lib/covered/rspec.rb
covered-0.25.1 lib/covered/rspec.rb
covered-0.25.0 lib/covered/rspec.rb
covered-0.24.3 lib/covered/rspec.rb
covered-0.24.2 lib/covered/rspec.rb
covered-0.24.1 lib/covered/rspec.rb
covered-0.24.0 lib/covered/rspec.rb
covered-0.23.0 lib/covered/rspec.rb
covered-0.22.1 lib/covered/rspec.rb
covered-0.22.0 lib/covered/rspec.rb
covered-0.21.0 lib/covered/rspec.rb
covered-0.20.2 lib/covered/rspec.rb
covered-0.20.1 lib/covered/rspec.rb
covered-0.20.0 lib/covered/rspec.rb