module ActiveFedora::TestSupport
Public Instance Methods
assert_active_fedora_belongs_to(subject, association_name, object)
click to toggle source
Assert that the :subject’s :association_name equals the input :object
# File lib/active_fedora/test_support.rb, line 5 def assert_active_fedora_belongs_to(subject, association_name, object) subject.send(association_name).must_equal object end
assert_active_fedora_has_many(subject, association_name, objects)
click to toggle source
Assert that the :subject’s :association_name contains all of the :objects
# File lib/active_fedora/test_support.rb, line 10 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