Sha256: 24f3c420508ca9f32e3e68fa1ad0043cda6a36763d59a1cb3f1361b3a301e13e

Contents?: true

Size: 801 Bytes

Versions: 16

Compression:

Stored size: 801 Bytes

Contents

require 'spec_helper'

module LicenseFinder
  describe MergedReport do
    describe '#to_s' do
      it 'displays the path to the dependency' do
        foo = Package.new('foo', '1.0.0', spec_licenses: ['MIT'])
        bar = Package.new('bar', '2.0.0', spec_licenses: ['GPLv2'])

        merged_foo = MergedPackage.new(foo, ['path/to/foo'])
        merged_bar = MergedPackage.new(bar, ['path/to/bar'])
        expanded_foo_path = File.expand_path(merged_foo.subproject_paths[0])
        expanded_bar_path = File.expand_path(merged_bar.subproject_paths[0])

        report = MergedReport.new([merged_foo, merged_bar])
        expect(report.to_s).to include("foo,1.0.0,MIT,#{expanded_foo_path}")
        expect(report.to_s).to include("bar,2.0.0,GPLv2,#{expanded_bar_path}")
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
license_finder-3.0.4 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-3.0.2 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-3.0.1 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-3.0.0 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.2 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.1 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc9 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc8 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc7 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc6 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc5 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc4 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc3 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc2 spec/lib/license_finder/reports/merged_report_spec.rb
license_finder-2.1.0.rc1 spec/lib/license_finder/reports/merged_report_spec.rb