Cleanup stateless methods

This commit is contained in:
Markus Schirp 2014-03-05 18:53:55 +00:00
parent e4f11543c8
commit 6873fb4451

View file

@ -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