1
0
mirror of https://github.com/danbee/my-images synced 2025-03-04 08:49:05 +00:00
my-images/spec/support/matchers/have_attached_file.rb

8 lines
143 B
Ruby

RSpec::Matchers.define :have_attached_file do |name|
match do |record|
file = record.send(name)
file.respond_to?(:attach)
end
end