free_mutant/test_app/lib/test_app.rb
Markus Schirp a2de0442f6 Skip method subjects defined in blocks
* No easy way to insert mutants on these via current monkey patching
  loader
* The blocks are typically part of a method building library when those
  libraries are mutated the def/defs nodes will be part of an mutated
  block that is included in a subject.

[fix #254]
2014-09-16 21:07:26 +00:00

101 lines
1.6 KiB
Ruby

# encoding: utf-8
# Namespace for test application
module TestApp
module InstanceMethodTests
module DefinedOnce
def foo; end
end
class WithMemoizer
include Adamantium
def foo; end
memoize :foo
end
module DefinedMultipleTimes
class DifferentLines
def foo
end
def foo(_arg)
end
end
class SameLineSameScope
def foo; end; def foo(_arg); end
end
class SameLineDifferentScope
def self.foo; end; def foo(_arg); end
end
end
class InClassEval
class_eval do
def foo
end
end
end
class InModuleEval
module_eval do
def foo
end
end
end
class InInstanceEval
module_eval do
def foo
end
end
end
end
module SingletonMethodTests
module DefinedOnSelf
def self.foo; end
end
module AlsoDefinedOnLvar
a = Object.new
def a.foo; end; def self.foo; end
end
module DefinedOnConstant
module InsideNamespace
def InsideNamespace.foo
end
end
module OutsideNamespace
end
def OutsideNamespace.foo
end
end
module DefinedMultipleTimes
module DifferentLines
def self.foo
end
def self.foo(_arg)
end
end
module SameLine
module SameScope
def self.foo; end; def self.foo(_arg); end;
end
module DifferentScope
def self.foo; end; def DifferentScope.foo(_arg); end
end
end
end
end
end
require 'test_app/literal'