Sha256: a9a1faa1aafaa5e13fb0707af3417153be677838168a6e5b6d28b5abad762be6

Contents?: true

Size: 919 Bytes

Versions: 5

Compression:

Stored size: 919 Bytes

Contents

require "spec_helper"

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

      let(:dep2) do
        Dependency.new(
          'name' => 'gem_b',
          'version' => '1.0',
          'summary' => 'Summary',
          'description' => 'Description',
          'license' => License.find_by_name('MIT')
        )
      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

5 entries across 5 versions & 1 rubygems

Version Path
license_finder-1.1.1-java spec/lib/license_finder/reports/detailed_text_report_spec.rb
license_finder-1.1.1 spec/lib/license_finder/reports/detailed_text_report_spec.rb
license_finder-1.1.0 spec/lib/license_finder/reports/detailed_text_report_spec.rb
license_finder-1.0.1 spec/lib/license_finder/reports/detailed_text_report_spec.rb
license_finder-1.0.0.1 spec/lib/license_finder/reports/detailed_text_report_spec.rb