Sha256: c69f6afad95402c6b0c83c811fceb1ccf2acd0d8a1b33f31b9c4c68a962e4df8

Contents?: true

Size: 390 Bytes

Versions: 1

Compression:

Stored size: 390 Bytes

Contents

require 'erb'

module FileHelper

	def compare_files(fixture_path, generated_path)
		fixture = File.read(fixture_path).split("\n")

		generated = ERB.new(File.read(generated_path)).result.split("\n")
		compare_by_line(fixture, generated)
	end

  def compare_by_line fixture, generated
    while fixture.any? && generated.any?
      expect(generated.pop).to eq fixture.pop
    end
  end
end 

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
insta_swag-0.1.1 spec/support/file_helper.rb