mirror of https://github.com/licensee/licensee.git
dont error on comparison of license with nil
This commit is contained in:
parent
f8c51c5351
commit
b264699dd9
|
@ -115,7 +115,7 @@ class Licensee
|
|||
end
|
||||
|
||||
def ==(other)
|
||||
key == other.key
|
||||
other != nil && key == other.key
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class Licensee
|
||||
VERSION = "5.0.0b2"
|
||||
VERSION = "5.0.0b3"
|
||||
end
|
||||
|
|
|
@ -37,6 +37,7 @@ class TestLicenseeLicense < Minitest::Test
|
|||
should "know license equality" do
|
||||
assert @license == Licensee::License.new("MIT")
|
||||
refute @license == Licensee::License.new("ISC")
|
||||
refute @license == nil
|
||||
end
|
||||
|
||||
should "know if the license is featured" do
|
||||
|
|
Loading…
Reference in New Issue