Sha256: 16d93d71bca882cc381ada2ed62c91a9faf2a9553711a4196a0f62cd7e4b9253

Contents?: true

Size: 1.91 KB

Versions: 20

Compression:

Stored size: 1.91 KB

Contents

require 'adamantium'

original = $VERBOSE
# Silence intentional violations made to exercise the method matcher edge cases.
# This is NOT representative for could you should write!
$VERBOSE = false
# Namespace for test application
module TestApp
  module InstanceMethodTests
    class WithMemoizer
      include Adamantium

      def bar; end; def baz; end
      eval('def boz; end')
      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 DefinedOnLvar
      a = self
      def a.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; def SingletonMethodTests.foo; end
        end

        module DifferentName
          def self.foo; end; def self.bar(_arg); end
        end
      end
    end
  end
end

require 'test_app/literal'
$VERBOSE = original

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
mutest-0.0.10 test_app/lib/test_app.rb
mutant-0.8.18 test_app/lib/test_app.rb
mutant-0.8.17 test_app/lib/test_app.rb
mutant-0.8.16 test_app/lib/test_app.rb
mutant-0.8.15 test_app/lib/test_app.rb
mutest-0.0.9 test_app/lib/test_app.rb
mutest-0.0.8 test_app/lib/test_app.rb
mutant-0.8.14 test_app/lib/test_app.rb
mutest-0.0.7 test_app/lib/test_app.rb
mutant-0.8.13 test_app/lib/test_app.rb
mutest-0.0.6 test_app/lib/test_app.rb
mutest-0.0.5 test_app/lib/test_app.rb
mutest-0.0.4 test_app/lib/test_app.rb
mutest-0.0.3 test_app/lib/test_app.rb
mutest-0.0.2 test_app/lib/test_app.rb
mutant-0.8.12 test_app/lib/test_app.rb
mutant-0.8.11 test_app/lib/test_app.rb
mutant-0.8.10 test_app/lib/test_app.rb
mutant-0.8.9 test_app/lib/test_app.rb
mutant-0.8.8 test_app/lib/test_app.rb