Sha256: a10e71514ef47cc7c839f645b14cf9d799a5a76c8ee069f5f2e0cc2c3ccdd494
Contents?: true
Size: 1.65 KB
Versions: 5
Compression:
Stored size: 1.65 KB
Contents
require 'spec_helper' module LicenseFinder describe GradlePackage do subject do described_class.new( "name" => "ch.qos.logback:logback-classic:1.1.1", "license" => [ { "name" => "MIT" } ] ) end its(:name) { should == "logback-classic" } its(:version) { should == "1.1.1" } its(:summary) { should == "" } its(:description) { should == "" } its(:homepage) { should == "" } its(:groups) { should == [] } # no way to get groups from gradle? its(:children) { should == [] } # no way to get children from gradle? its(:install_path) { should be_nil } describe "#license_names_from_spec" do it "returns the license" do expect(subject.license_names_from_spec).to eq ["MIT"] end context "when there are no licenses" do subject { described_class.new("name" => "a:b:c") } it "is empty" do expect(subject.license_names_from_spec).to be_empty end end context "when there are no real licenses" do subject do described_class.new( "name" => "a:b:c", "license" => [ { "name" => "No license found"} ] ) end it "is empty" do expect(subject.license_names_from_spec).to be_empty end end context "when there are multiple licenses" do subject do described_class.new( "name" => "a:b:c", "license" => [ { "name" => "1" }, { "name" => "2" } ] ) end it "returns multiple licenses" do expect(subject.license_names_from_spec).to eq ['1', '2'] end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems