Fix Memoizable test

This commit is contained in:
Dan Kubb 2018-11-06 11:06:04 -08:00
parent de35ad8ff8
commit b9ff7454e7
2 changed files with 4 additions and 2 deletions

View file

@ -12,10 +12,12 @@ module Mutant
# @param [UnboundMethod] method # @param [UnboundMethod] method
# #
# @return [Matcher::Method::Instance] # @return [Matcher::Method::Instance]
#
# :reek:ManualDispatch
def self.new(scope, target_method) def self.new(scope, target_method)
name = target_method.name name = target_method.name
evaluator = evaluator =
if scope.include?(Memoizable) && scope.memoized?(name) if scope.respond_to?(:memoized?) && scope.memoized?(name)
Evaluator::Memoized Evaluator::Memoized
else else
Evaluator Evaluator

View file

@ -7,7 +7,7 @@ $VERBOSE = false
# Namespace for test application # Namespace for test application
module TestApp module TestApp
module InstanceMethodTests module InstanceMethodTests
class WithMemoizer module WithMemoizer
include Adamantium include Adamantium
def bar; end; def baz; end def bar; end; def baz; end