def file_blob_data(path, options = {})
    # The line with base64 data must be indented further than the current line.
    indent = ' ' * ((options[:indent] || 2) + 2)

    file_path = Rails.root.join('test/fixtures'.freeze).join(path)
    blob_contents = File.binread file_path
    base64_data = Base64.encode64 blob_contents
    base64_data.gsub! "\n", "\n#{indent}"
    base64_data.strip!

    "!!binary |\n#{indent}#{base64_data}"
  end
def file_blob_data(path, options = {})
    # The line with base64 data must be indented further than the current line.
    indent = ' ' * ((options[:indent] || 2) + 2)

    file_path = Rails.root.join('test/fixtures'.freeze).join(path)
    blob_contents = File.binread file_path
    base64_data = Base64.encode64 blob_contents
    base64_data.gsub! "\n", "\n#{indent}"
    base64_data.strip!

    "!!binary |\n#{indent}#{base64_data}"
  end
The contents of a blob, in a YAML-friendly format.

 @param [String] path the path of the file whose contents is used in the
   fixture, relative to the Rails application's test/fixtures directory
 @param [Hash] options optionally specify the current indentation level
 @option options [Integer] indent the number of spaces that the current line
   in the YAML fixture file is indented by
 @return [String] the base64-encoded blob contents