spec/spec_helper.rb in licensee-9.2.1 vs spec/spec_helper.rb in licensee-9.3.0

- old
+ new

@@ -2,10 +2,11 @@ Coveralls.wear! require 'licensee' require 'open3' require 'tmpdir' +require 'mustache' RSpec.configure do |config| config.shared_context_metadata_behavior = :apply_to_host_groups config.example_status_persistence_file_path = 'spec/examples.txt' config.disable_monkey_patching! @@ -27,14 +28,13 @@ def fixture_path(fixture) File.expand_path fixture, fixtures_base end -def sub_copyright_info(text) - text.sub! '[fullname]', 'Ben Balter' - text.sub! '[year]', '2016' - text.sub! '[email]', 'ben@github.invalid' - text +def sub_copyright_info(license) + Mustache.render license.content_for_mustache, fullname: 'Ben Balter', + year: '2016', + email: 'ben@github.invalid' end # Add random words to the end of a license to test similarity tollerances def add_random_words(string, count = 5) words = string.dup.split(' ')