Sha256: 27270498db39b914d39e62499ab8b44558fd77572ef3d0582c0bf67bc3889e4d

Contents?: true

Size: 678 Bytes

Versions: 4

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

RSpec.describe 'license-path command' do
  let(:command) { ['bundle', 'exec', 'bin/licensee', 'license-path'] }
  let(:project_path) { fixture_path('mit_markdown') }
  let(:arguments) { [project_path] }
  let(:output) do
    Dir.chdir project_root do
      Open3.capture3(*[command, arguments].flatten)
    end
  end
  let(:parsed_output) { YAML.safe_load(stdout) }
  let(:stdout) { output[0] }
  let(:stderr) { output[1] }
  let(:status) { output[2] }

  it 'returns the license path' do
    expect(stdout).to match(File.join(project_path, 'LICENSE.md'))
  end

  it 'Returns a zero exit code' do
    expect(status.exitstatus).to be(0)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
licensee-9.18.0 spec/licensee/commands/license_path_spec.rb
licensee-9.17.1 spec/licensee/commands/license_path_spec.rb
licensee-9.17.0 spec/licensee/commands/license_path_spec.rb
licensee-9.16.1 spec/licensee/commands/license_path_spec.rb