Sha256: a5aefe61c1abc0c3098a1b50dc6a77cee99ad430da34c558cfc666dd645003cc

Contents?: true

Size: 542 Bytes

Versions: 14

Compression:

Stored size: 542 Bytes

Contents

require "spec_helper"
require "paperclip/matchers"

describe Paperclip::Shoulda::Matchers::HaveAttachedFileMatcher do
  extend Paperclip::Shoulda::Matchers

  it "rejects the dummy class if it has no attachment" do
    reset_table "dummies"
    reset_class "Dummy"
    matcher = self.class.have_attached_file(:avatar)
    expect(matcher).to_not accept(Dummy)
  end

  it "accepts the dummy class if it has an attachment" do
    rebuild_model
    matcher = self.class.have_attached_file(:avatar)
    expect(matcher).to accept(Dummy)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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