Sha256: 66e814991ecfb4ead54ee539dec98e9d10032abc5ce3fc78c79588544d8c4b25

Contents?: true

Size: 945 Bytes

Versions: 6

Compression:

Stored size: 945 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
appmap-0.27.0 spec/rspec_feature_metadata_spec.rb
appmap-0.26.1 spec/rspec_feature_metadata_spec.rb
appmap-0.26.0 spec/rspec_feature_metadata_spec.rb
appmap-0.25.2 spec/rspec_feature_metadata_spec.rb
appmap-0.25.0 spec/rspec_feature_metadata_spec.rb
appmap-0.23.0 spec/rspec_feature_metadata_spec.rb