Sha256: d7e0f56cdae9a39d24f8fba92838c19136a5054da1f0de8783f8fee178986202
Contents?: true
Size: 725 Bytes
Versions: 6
Compression:
Stored size: 725 Bytes
Contents
require 'spec_helper' describe "Associations" do describe User do subject { User } it { should have_many_related :articles } it { should have_many_related :comments } it { should embed_one :profile } end describe Profile do subject { Profile } it { should be_embedded_in(:user).as_inverse_of(:profile) } end describe Article do subject { Article } it { should belong_to_related(:user).as_inverse_of(:articles) } it { should embed_many(:comments) } end describe Comment do subject { Comment } it { should be_embedded_in(:article).as_inverse_of(:comments) } it { should belong_to_related(:user).as_inverse_of(:comments) } end end
Version data entries
6 entries across 6 versions & 2 rubygems