Cleanup stateless methods
This commit is contained in:
parent
e4f11543c8
commit
6873fb4451
1 changed files with 4 additions and 32 deletions
|
@ -95,44 +95,16 @@ module Mutant
|
|||
# @api private
|
||||
#
|
||||
def reporter
|
||||
reporter_class = RSpec::Core::Reporter
|
||||
|
||||
if strategy.rspec2?
|
||||
rspec2_reporter
|
||||
reporter_class.new
|
||||
else
|
||||
rspec3_reporter
|
||||
reporter_class.new(strategy.configuration)
|
||||
end
|
||||
end
|
||||
memoize :reporter, freezer: :noop
|
||||
|
||||
# Instantiate RSpec 2 reporter
|
||||
#
|
||||
# @return [RSpec::Core::Reporter]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def rspec2_reporter
|
||||
reporter_class.new
|
||||
end
|
||||
|
||||
# Instantiate RSpec 3 reporter
|
||||
#
|
||||
# @return [RSpec::Core::Reporter]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def rspec3_reporter
|
||||
reporter_class.new(strategy.configuration)
|
||||
end
|
||||
|
||||
# Reporter class
|
||||
#
|
||||
# @return [Class]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def reporter_class
|
||||
RSpec::Core::Reporter
|
||||
end
|
||||
|
||||
end # Killer
|
||||
end # Rspec
|
||||
end # Mutant
|
||||
|
|
Loading…
Add table
Reference in a new issue