Fix some tests

This commit is contained in:
Thomas Reynolds 2015-11-28 19:32:45 -08:00
parent e47b0ae29a
commit ae15d203a8
3 changed files with 6 additions and 7 deletions

View file

@ -468,13 +468,12 @@ module Middleman
#
# @param [Pathname] path The path.
# @return [Middleman::SourceFile]
Contract Pathname, Pathname, Symbol => IsA['Middleman::SourceFile']
def path_to_source_file(path, directory, type)
Contract Pathname, Pathname, Symbol, Bool => IsA['Middleman::SourceFile']
def path_to_source_file(path, directory, type, destination_dir)
types = Set.new([type])
relative_path = path.relative_path_from(directory)
# destination_dir = @options.fetch(:destination_dir, false)
# relative_path = File.join(destination_dir, relative_path) if destination_dir
relative_path = File.join(destination_dir, relative_path) if destination_dir
::Middleman::SourceFile.new(Pathname(relative_path), path, directory, types)
end