Sha256: 5cf5746e0d831c8a252ad1f633eccf6bb2885d8873c48461f67efb3f2a1b68c3

Contents?: true

Size: 512 Bytes

Versions: 7

Compression:

Stored size: 512 Bytes

Contents

require 'test/unit'
require File.join(File.dirname(__FILE__), '../lib/image_temp_file')

class ImageTempFileTest < Test::Unit::TestCase
  include MiniMagick

  def test_multiple_calls_yield_different_files
    first = ImageTempFile.new('test')
    second = ImageTempFile.new('test')
    assert_not_equal first.path, second.path
  end

  def test_temp_file_has_given_extension
    assert_match /^[^.]+\.jpg$/, ImageTempFile.new('jpg').path
    assert_match /^[^.]+\.png$/, ImageTempFile.new('png').path
  end
end

Version data entries

7 entries across 7 versions & 5 rubygems

Version Path
remvee-mini_magick-1.2.3.2 test/image_temp_file_test.rb
remvee-mini_magick-1.2.3.3 test/image_temp_file_test.rb
remvee-mini_magick-1.2.3.4.0 test/image_temp_file_test.rb
tupalo-mini_magick-1.2.5 test/image_temp_file_test.rb
edouard-mini_magick-1.2.6 test/image_temp_file_test.rb
dsturnbull-mini_magick-1.2.6 test/image_temp_file_test.rb
mini_magick-1.2.5 test/image_temp_file_test.rb