Sha256: 1165abc7a18559dbd25cb094edca8a6f2bccd82fa4239992e3347b85f0d6a370

Contents?: true

Size: 665 Bytes

Versions: 32

Compression:

Stored size: 665 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe 'AppMap::ClassMap' do
  describe '.build_from_methods' do
    it 'includes method comment' do
      map = AppMap.class_map([ruby_method((method :test_method))])
      function = dig_map(map, 5)[0]
      expect(function).to include(:comment)
    end

    # test method comment
    def test_method
      'test method body'
    end

    def ruby_method(method)
      AppMap::Trace::RubyMethod.new AppMap::Config::Package.new('pkg'), method.receiver.class.name, method, false
    end

    def dig_map(map, depth)
      return map if depth == 0

      dig_map map[0][:children], depth - 1
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
appmap-0.83.4 spec/class_map_spec.rb
appmap-0.83.3 spec/class_map_spec.rb
appmap-0.83.2 spec/class_map_spec.rb
appmap-0.83.1 spec/class_map_spec.rb
appmap-0.83.0 spec/class_map_spec.rb
appmap-0.82.0 spec/class_map_spec.rb
appmap-0.81.1 spec/class_map_spec.rb
appmap-0.81.0 spec/class_map_spec.rb
appmap-0.80.2 spec/class_map_spec.rb
appmap-0.80.1 spec/class_map_spec.rb
appmap-0.80.0 spec/class_map_spec.rb
appmap-0.79.0 spec/class_map_spec.rb
appmap-0.78.0 spec/class_map_spec.rb
appmap-0.77.4 spec/class_map_spec.rb
appmap-0.77.3 spec/class_map_spec.rb
appmap-0.77.2 spec/class_map_spec.rb
appmap-0.77.1 spec/class_map_spec.rb
appmap-0.77.0 spec/class_map_spec.rb
appmap-0.76.0 spec/class_map_spec.rb
appmap-0.75.0 spec/class_map_spec.rb