Sha256: 578078e77fa4f863fc63c1055f449c750dec7adaf3b5b53f361aa6ca871827c2
Contents?: true
Size: 1.18 KB
Versions: 84
Compression:
Stored size: 1.18 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'test_helper' require 'English' class MinitestTest < Minitest::Test def perform_minitest_test(test_name) Bundler.with_clean_env do Dir.chdir 'test/fixtures/minitest_recorder' do FileUtils.rm_rf 'tmp' system 'bundle config --local local.appmap ../../..' system 'bundle' system({ 'APPMAP' => 'true' }, %(bundle exec ruby -Ilib -Itest test/#{test_name}_test.rb)) yield end end end def test_hello perform_minitest_test 'hello' do appmap_file = 'tmp/appmap/minitest/Hello_hello.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 'minitest_recorder', metadata['app'] assert_equal 'minitest', metadata['recorder']['name'] assert_equal 'ruby', metadata['language']['name'] assert_equal 'Hello hello', metadata['name'] assert_equal 'test/hello_test.rb:9', metadata['source_location'] end end end
Version data entries
84 entries across 84 versions & 1 rubygems