Sha256: 6e386d460e56ac9fcc11c00b8a8a36fe43a558c4db8036431303166c6cbdee37
Contents?: true
Size: 556 Bytes
Versions: 5
Compression:
Stored size: 556 Bytes
Contents
require 'spec_helper' describe DataMapper::Matchers::BelongTo do context '#should' do it 'passes if association exists' do lambda { Book.should belong_to :author }.should_pass end it 'fails if association does not exist' do lambda { Book.should belong_to :bad_relation}.should fail_with "expected to belong to bad_relation" end end context '#should_not' do it 'fails if association exists' do lambda { Book.should_not belong_to :author }.should fail_with "expected to not belong to author" end end end
Version data entries
5 entries across 5 versions & 1 rubygems