module Shoulda::ActiveRecord::Matchers
def have_one(name)
it { should have_one(:god) } # unless hindu
Example:
dependent option.
* :dependent - tests that the association makes use of the
Options:
associations.
associated table has the required columns. Works with polymorphic
Ensure that the has_one relationship exists. Will also test that the
def have_one(name) AssociationMatcher.new(:has_one, name) end