Sha256: a4b39c478502e536fab0c00cab7e37646196314f5b6a89e9fbd63e3d91f9da19

Contents?: true

Size: 1007 Bytes

Versions: 105

Compression:

Stored size: 1007 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'test_helper'
require 'English'

class RecordProcessTest < Minitest::Test
  def perform_test(program_name)
    Bundler.with_clean_env do
      Dir.chdir 'test/fixtures/process_recorder' do
        FileUtils.rm_rf 'tmp'
        system 'bundle config --local local.appmap ../../..'
        system 'bundle'
        system(%(bundle exec ruby #{program_name}))

        yield
      end
    end
  end

  def test_hello
    perform_test 'hello.rb' do
      appmap_file = 'appmap.json'

      assert File.file?(appmap_file), 'appmap output file does not exist'
      appmap = JSON.parse(File.read(appmap_file))
      assert_equal AppMap::APPMAP_FORMAT_VERSION, appmap['version']
      assert_includes appmap.keys, 'metadata'
      metadata = appmap['metadata']
      assert_equal 'process_recorder', metadata['app']
      assert_equal 'record_process', metadata['recorder']['name']
      assert_equal 'ruby', metadata['language']['name']
    end
  end
end

Version data entries

105 entries across 105 versions & 1 rubygems

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