Sha256: 1f4d733011c8e870e972e600645581c8eff8499f33c749833ebca991b9a3e992

Contents?: true

Size: 531 Bytes

Versions: 23

Compression:

Stored size: 531 Bytes

Contents

require './test/helper'

class NilAdapterTest < Test::Unit::TestCase
  context 'a new instance' do
    setup do
      @subject = Paperclip.io_adapters.for(nil)
    end

    should "get the right filename" do
      assert_equal "", @subject.original_filename
    end

    should "get the content type" do
      assert_equal "", @subject.content_type
    end

    should "get the file's size" do
      assert_equal 0, @subject.size
    end

    should "return true for a call to nil?" do
      assert @subject.nil?
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
paperclip-4.1.1 test/io_adapters/nil_adapter_test.rb
paperclip-4.1.0 test/io_adapters/nil_adapter_test.rb
paperclip-3.5.4 test/io_adapters/nil_adapter_test.rb
paperclip-4.0.0 test/io_adapters/nil_adapter_test.rb
paperclip-3.5.3 test/io_adapters/nil_adapter_test.rb
paperclip-3.5.2 test/io_adapters/nil_adapter_test.rb
paperclip-3.5.1 test/io_adapters/nil_adapter_test.rb
paperclip-3.5.0 test/io_adapters/nil_adapter_test.rb
paperclip-3.4.2 test/io_adapters/nil_adapter_test.rb
paperclip-3.4.1 test/io_adapters/nil_adapter_test.rb
paperclip-3.4.0 test/io_adapters/nil_adapter_test.rb
paperclip-3.3.1 test/io_adapters/nil_adapter_test.rb
paperclip-3.2.1 test/io_adapters/nil_adapter_test.rb
paperclip-3.3.0 test/io_adapters/nil_adapter_test.rb
paperclip-3.2.0 test/io_adapters/nil_adapter_test.rb
paperclip-3.1.4 test/io_adapters/nil_adapter_test.rb
paperclip-3.1.2 test/io_adapters/nil_adapter_test.rb
paperclip-3.1.1 test/io_adapters/nil_adapter_test.rb
paperclip-3.1.0 test/io_adapters/nil_adapter_test.rb
paperclip-3.0.4 test/io_adapters/nil_adapter_test.rb