Sha256: 567c2c2a77b868b29ed7afa61715f470cdf45f02fb2f858c6642a51e35867b8e

Contents?: true

Size: 743 Bytes

Versions: 3

Compression:

Stored size: 743 Bytes

Contents

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

require 'test_helper'
require 'English'

class RSpecTest < Minitest::Test
  def test_record_rspec
    Bundler.with_clean_env do
      Dir.chdir 'test/fixtures/rspec_recorder' do
        appmap_file = 'tmp/appmap/rspec/Hello_says_hello.json'
        FileUtils.rm_rf 'tmp'
        system 'bundle'
        system({ 'APPMAP' => 'true' }, 'bundle exec rspec')
        assert File.file?(appmap_file), 'appmap output file does not exist'
        assert_includes File.read(appmap_file), %("class":"String","value":"Hello!")
        assert_includes File.read(appmap_file), %("feature":"Say hello")
        assert_includes File.read(appmap_file), %("feature_group":"Hello")
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
appmap-0.20.0 test/rspec_test.rb
appmap-0.19.0 test/rspec_test.rb
appmap-0.18.1 test/rspec_test.rb