Sha256: e02e05d16e91901c4cb303e9913e628efbb8ce2476959d4ae65ee70e083a7af9

Contents?: true

Size: 442 Bytes

Versions: 22

Compression:

Stored size: 442 Bytes

Contents

require 'spec_helper'

describe "Attachment Definitions" do
  it 'returns all of the attachments on the class' do
    reset_class "Dummy"
    Dummy.has_attached_file :avatar, {path: "abc"}
    Dummy.has_attached_file :other_attachment, {url: "123"}
    Dummy.do_not_validate_attachment_file_type :avatar
    expected = {avatar: {path: "abc"}, other_attachment: {url: "123"}}

    expect(Dummy.attachment_definitions).to eq expected
  end
end

Version data entries

22 entries across 22 versions & 5 rubygems

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