Sha256: fd679349f96870c580430825cee45417ca2c587dd6a2b20ef112471395cd7d18

Contents?: true

Size: 542 Bytes

Versions: 32

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

32 entries across 30 versions & 6 rubygems

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