Sha256: 8954857890618925c6604750e20aac833558d3c67d15416558908c98d3526625

Contents?: true

Size: 983 Bytes

Versions: 5

Compression:

Stored size: 983 Bytes

Contents

# frozen_string_literal: true

require 'rails_spec_helper'

describe 'RSpec feature and feature group metadata' do
  include_examples 'Rails app pg database', 'spec/fixtures/rails5_users_app' do
    around(:each) do |example|
      FileUtils.rm_rf tmpdir
      FileUtils.mkdir_p tmpdir
      cmd = "docker-compose run --rm -e APPMAP=true -v #{File.absolute_path(tmpdir).shellescape}:/app/tmp app ./bin/rspec spec/models/user_spec.rb"
      run_cmd cmd, chdir: fixture_dir

      example.run
    end

    let(:tmpdir) { 'tmp/spec/RSpec feature and feature group metadata' }
    let(:appmap_json) { File.join(tmpdir, %(appmap/rspec/User_creation_creates_charles.appmap.json)) }

    describe do
      it 'are recorded in the appmap' do
        expect(File).to exist(appmap_json)
        appmap = JSON.parse(File.read(appmap_json)).to_yaml

        expect(appmap).to include(<<-METADATA.strip)
  feature: Create a user
  feature_group: User
        METADATA
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
appmap-0.40.0 spec/rspec_feature_metadata_spec.rb
appmap-0.39.1 spec/rspec_feature_metadata_spec.rb
appmap-0.39.0 spec/rspec_feature_metadata_spec.rb
appmap-0.38.1 spec/rspec_feature_metadata_spec.rb
appmap-0.37.2 spec/rspec_feature_metadata_spec.rb