mirror of https://github.com/licensee/licensee.git
remove diff method
This commit is contained in:
parent
d778ad785f
commit
b94497a16b
|
@ -40,11 +40,6 @@ class Licensee
|
||||||
Licensee::Project.new(path).license
|
Licensee::Project.new(path).license
|
||||||
end
|
end
|
||||||
|
|
||||||
# Diffs the project license and the known license
|
|
||||||
def diff(path)
|
|
||||||
Licensee::Project.new(path).license_file.diff
|
|
||||||
end
|
|
||||||
|
|
||||||
# Array of matchers to use, in order of preference
|
# Array of matchers to use, in order of preference
|
||||||
# The order should be decending order of anticipated speed to match
|
# The order should be decending order of anticipated speed to match
|
||||||
def matchers
|
def matchers
|
||||||
|
|
|
@ -12,10 +12,6 @@ class TestLicensee < Minitest::Test
|
||||||
assert_equal "mit", Licensee.license(fixture_path("licenses.git")).key
|
assert_equal "mit", Licensee.license(fixture_path("licenses.git")).key
|
||||||
end
|
end
|
||||||
|
|
||||||
should "diff a license" do
|
|
||||||
Licensee.diff(fixture_path("licenses.git"))
|
|
||||||
end
|
|
||||||
|
|
||||||
context "confidence threshold" do
|
context "confidence threshold" do
|
||||||
should "return the confidence threshold" do
|
should "return the confidence threshold" do
|
||||||
assert_equal 90, Licensee.confidence_threshold
|
assert_equal 90, Licensee.confidence_threshold
|
||||||
|
|
|
@ -21,12 +21,7 @@ class TestLicenseeProjectFile < Minitest::Test
|
||||||
should "know the path" do
|
should "know the path" do
|
||||||
assert_equal "LICENSE", @file.path
|
assert_equal "LICENSE", @file.path
|
||||||
end
|
end
|
||||||
|
|
||||||
should "diff the file" do
|
|
||||||
expected = "-Copyright (c) [year] [fullname]\n+Copyright (c) 2014 Ben Balter"
|
|
||||||
assert @file.diff.include?(expected)
|
|
||||||
end
|
|
||||||
|
|
||||||
should "calculate confidence" do
|
should "calculate confidence" do
|
||||||
assert_equal 100, @file.confidence
|
assert_equal 100, @file.confidence
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue