Sha256: c1980db5908527988b1dac97cafe1be9feb45c5cedf32c42c77a2b8d44461b6d

Contents?: true

Size: 745 Bytes

Versions: 24

Compression:

Stored size: 745 Bytes

Contents

require "spec_helper"

class FooLicense < LicenseFinder::License::Base
  self.alternative_names = ["the foo license"]
  self.license_url = "http://foo.license.com"
end

describe LicenseFinder::LicenseUrl do
  describe ".find_by_name" do
    subject { LicenseFinder::LicenseUrl }

    specify { subject.find_by_name("FooLicense").should      == "http://foo.license.com" }
    specify { subject.find_by_name("fOolICENse").should      == "http://foo.license.com" }
    specify { subject.find_by_name("the foo license").should == "http://foo.license.com" }

    specify { subject.find_by_name(nil).should be_nil }
    specify { subject.find_by_name("").should be_nil }
    specify { subject.find_by_name("unknown license").should be_nil }
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
license_finder-0.9.5.1-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.5.1 spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.5 spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.5-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.4-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.4 spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.3-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.3 spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.2-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.2 spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.1-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.1 spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.0-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.9.0 spec/lib/license_finder/license_url_spec.rb
license_finder-0.8.2-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.8.2 spec/lib/license_finder/license_url_spec.rb
license_finder-0.8.1-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.8.1 spec/lib/license_finder/license_url_spec.rb
license_finder-0.8.0-java spec/lib/license_finder/license_url_spec.rb
license_finder-0.8.0 spec/lib/license_finder/license_url_spec.rb