# frozen_string_literal: true module FixturesHelper def load_diff(file_path, fixture_name) raw_diff = load_fixture(fixture_name + '.diff') return unless raw_diff double( patch: raw_diff, path: file_path ) end def load_fixture(file_name) file = "#{File.dirname(__FILE__)}/fixtures/#{file_name}" return File.read(file) if File.exist?(file) end end