Sha256: 5b1b75e7a72a8055b301ecd77e7edc53eb8dbff16d5674592ddb4ccedb5e0c21
Contents?: true
Size: 692 Bytes
Versions: 120
Compression:
Stored size: 692 Bytes
Contents
require File.expand_path('../../../spec/support/an_active_model', __FILE__) module ActiveFedora module TestSupport # Assert that the :subject's :association_name equals the input :object def assert_active_fedora_belongs_to(subject, association_name, object) subject.send(association_name).must_equal object end # Assert that the :subject's :association_name contains all of the :objects def assert_active_fedora_has_many(subject, association_name, objects) association = subject.send(association_name) assert_equal objects.count, association.count objects.each do |object| assert association.include?(object) end end end end
Version data entries
120 entries across 120 versions & 1 rubygems