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.7.3 spec/lib/license_finder/license_url_spec.rb
license_finder-0.7.1 spec/lib/license_finder/license_url_spec.rb
license_finder-0.7.0 spec/lib/license_finder/license_url_spec.rb
license_finder-0.6.0 spec/lib/license_finder/license_url_spec.rb