Sha256: cdcdcbfdfc8764889c662b06627afd9f813179835c0a018f13ed2e80acb7c3bd

Contents?: true

Size: 1.01 KB

Versions: 8

Compression:

Stored size: 1.01 KB

Contents

require "spec_helper"

module LicenseFinder
  describe DetailedTextReport do
    describe '#to_s' do
      let(:dep1) do
        dependency = Dependency.new(
          'name' => 'gem_a',
          'version' => '1.0',
          'summary' => 'Summary',
          'description' => 'Description'
        )
        dependency.license = LicenseFinder::LicenseAlias.create(name: 'MIT')
        dependency
      end

      let(:dep2) do
        dependency = Dependency.new(
          'name' => 'gem_b',
          'version' => '1.0',
          'summary' => 'Summary',
          'description' => 'Description'
        )
        dependency.license = LicenseFinder::LicenseAlias.create(name: 'MIT')
        dependency
      end

      subject { DetailedTextReport.new([dep2, dep1]).to_s }

      it 'should generate a text report with the name, version, license, summary and description of each dependency, sorted by name' do
        should == "gem_a,1.0,MIT,Summary,Description\ngem_b,1.0,MIT,Summary,Description\n"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
license_finder-1.0.0.0 spec/lib/license_finder/reports/detailed_text_report_spec.rb
license_finder-1.0.0.0-java spec/lib/license_finder/reports/detailed_text_report_spec.rb
license_finder-0.9.5.1-java spec/lib/license_finder/detailed_text_report_spec.rb
license_finder-0.9.5.1 spec/lib/license_finder/detailed_text_report_spec.rb
license_finder-0.9.5 spec/lib/license_finder/detailed_text_report_spec.rb
license_finder-0.9.5-java spec/lib/license_finder/detailed_text_report_spec.rb
license_finder-0.9.4-java spec/lib/license_finder/detailed_text_report_spec.rb
license_finder-0.9.4 spec/lib/license_finder/detailed_text_report_spec.rb