module Shoulda::ActiveRecord::Macros

def should_belong_to(*associations)


should_belong_to :parent

Ensure that the belongs_to relationship exists.
def should_belong_to(*associations)
  dependent = get_options!(associations, :dependent)
  klass = model_class
  associations.each do |association|
    matcher = belong_to(association).dependent(dependent)
    should matcher.description do
      assert_accepts(matcher, klass.new)
    end
  end
end