remove diff method

This commit is contained in:
Ben Balter 2015-09-01 18:46:06 -04:00
parent d778ad785f
commit b94497a16b
3 changed files with 1 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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