Sha256: 586514545b2a55db3aaf3e8de1715b18c27da43afc688152ae68bf9f6d413051

Contents?: true

Size: 976 Bytes

Versions: 15

Compression:

Stored size: 976 Bytes

Contents

# frozen_string_literal: true

require 'rails_spec_helper'

describe 'RSpec feature and feature group metadata' do
  before(:all) { @fixture_dir = 'spec/fixtures/rails_users_app' }
  include_examples 'Rails app pg database'
  
  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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
appmap-0.37.0 spec/rspec_feature_metadata_spec.rb
appmap-0.36.0 spec/rspec_feature_metadata_spec.rb
appmap-0.35.2 spec/rspec_feature_metadata_spec.rb
appmap-0.35.1 spec/rspec_feature_metadata_spec.rb
appmap-0.35.0 spec/rspec_feature_metadata_spec.rb
appmap-0.34.5 spec/rspec_feature_metadata_spec.rb
appmap-0.34.4 spec/rspec_feature_metadata_spec.rb
appmap-0.34.2 spec/rspec_feature_metadata_spec.rb
appmap-0.34.1 spec/rspec_feature_metadata_spec.rb
appmap-0.34.0 spec/rspec_feature_metadata_spec.rb
appmap-0.33.0 spec/rspec_feature_metadata_spec.rb
appmap-0.32.0 spec/rspec_feature_metadata_spec.rb
appmap-0.31.0 spec/rspec_feature_metadata_spec.rb
appmap-0.28.1 spec/rspec_feature_metadata_spec.rb
appmap-0.28.0 spec/rspec_feature_metadata_spec.rb