Sha256: 774a3773bbb08f2db07f0123b359aabe57c407763160bb55657ea3bdc7d2cbef

Contents?: true

Size: 658 Bytes

Versions: 46

Compression:

Stored size: 658 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, 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

46 entries across 46 versions & 1 rubygems

Version Path
appmap-0.69.0 spec/class_map_spec.rb
appmap-0.68.2 spec/class_map_spec.rb
appmap-0.68.1 spec/class_map_spec.rb
appmap-0.68.0 spec/class_map_spec.rb
appmap-0.67.1 spec/class_map_spec.rb
appmap-0.67.0 spec/class_map_spec.rb
appmap-0.66.2 spec/class_map_spec.rb
appmap-0.66.1 spec/class_map_spec.rb
appmap-0.66.0 spec/class_map_spec.rb
appmap-0.65.1 spec/class_map_spec.rb
appmap-0.65.0 spec/class_map_spec.rb
appmap-0.64.0 spec/class_map_spec.rb
appmap-0.63.0 spec/class_map_spec.rb
appmap-0.62.1 spec/class_map_spec.rb
appmap-0.62.0 spec/class_map_spec.rb
appmap-0.61.1 spec/class_map_spec.rb
appmap-0.61.0 spec/class_map_spec.rb
appmap-0.60.0 spec/class_map_spec.rb
appmap-0.59.2 spec/class_map_spec.rb
appmap-0.59.1 spec/class_map_spec.rb