Sha256: 17cdd93a0ceba0e59c95e7ac69eda396cb88537dde64816a4c51b1f677477466

Contents?: true

Size: 444 Bytes

Versions: 14

Compression:

Stored size: 444 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

14 entries across 14 versions & 1 rubygems

Version Path
kt-paperclip-7.2.2 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-7.2.1 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-7.2.0 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-6.4.2 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-7.1.1 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-7.1.0 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-7.0.1 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-7.0.0 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-6.4.1 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-6.4.0 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-6.3.0 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-6.2.2 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-6.2.1 spec/paperclip/attachment_definitions_spec.rb
kt-paperclip-6.2.0 spec/paperclip/attachment_definitions_spec.rb