test/functions.rb in licensee-4.9.0 vs test/functions.rb in licensee-5.0.0b1

- old
+ new

@@ -1,9 +1,9 @@ # Pulled from helper.rb because something in the test suite monkey patches benchmarking require 'securerandom' -require 'licensee/filesystem_repository' +require_relative '../lib/licensee' def fixtures_base File.expand_path "fixtures", File.dirname( __FILE__ ) end @@ -34,10 +34,10 @@ text = license_from_path(license) text = chaos_monkey(text) if chaos text = wrap(text, wrap) if wrap blob = FakeBlob.new(text) - license_file = Licensee::LicenseFile.new(blob) + license_file = Licensee::ProjectFile.new(blob, "LICENSE") actual = license_file.match assert actual, "No match for #{expected}. Here's the test text:\n#{text}" assert_equal expected, actual.key, "expeceted #{expected} but got #{actual.key} for .match. Confidence: #{license_file.confidence}. Method: #{license_file.matcher.class}" end