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
#
# @return [Matcher::Method::Instance]
#
# :reek:ManualDispatch
def self.new(scope, target_method)
name = target_method.name
evaluator =
if scope.include?(Memoizable) && scope.memoized?(name)
if scope.respond_to?(:memoized?) && scope.memoized?(name)
Evaluator::Memoized
else
Evaluator

View File

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