Sha256: 5f9fa3f3c55de66032a7468b199a3244404c65c045d02aa2dc88552e0ee90882

Contents?: true

Size: 508 Bytes

Versions: 32

Compression:

Stored size: 508 Bytes

Contents

require 'spec_helper'

describe Paperclip::NilAdapter do
  context 'a new instance' do
    before do
      @subject = Paperclip.io_adapters.for(nil)
    end

    it "gets the right filename" do
      assert_equal "", @subject.original_filename
    end

    it "gets the content type" do
      assert_equal "", @subject.content_type
    end

    it "gets the file's size" do
      assert_equal 0, @subject.size
    end

    it "returns true for a call to nil?" do
      assert @subject.nil?
    end
  end
end

Version data entries

32 entries across 30 versions & 6 rubygems

Version Path
kt-paperclip-5.4.0 spec/paperclip/io_adapters/nil_adapter_spec.rb
kt-paperclip-4.4.0 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-6.1.0 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-6.0.0 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-5.3.0 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-5.2.1 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-5.2.0 spec/paperclip/io_adapters/nil_adapter_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paperclip-5.1.0/spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-5.1.0 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-5.0.0 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-4.3.7 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip_jk-5.0.0.beta2 spec/paperclip/io_adapters/nil_adapter_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/paperclip-4.3.6/spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-5.0.0.beta2 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-5.0.0.beta1 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-4.3.6 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-4.3.5 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-4.3.4 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-4.3.3 spec/paperclip/io_adapters/nil_adapter_spec.rb
paperclip-4.3.2 spec/paperclip/io_adapters/nil_adapter_spec.rb