Sha256: 9379cfa2a6faadcc7f014acec662fa66b3b34c2942c8ed0edb7f7f5401cb3735
Contents?: true
Size: 750 Bytes
Versions: 10
Compression:
Stored size: 750 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe "Dynamoid::Associations::HasMany" do before do @magazine = Magazine.create end it 'determines equality from its records' do @subscription = @magazine.subscriptions.create @magazine.subscriptions.should == @subscription end it 'determines target association correctly' do @magazine.subscriptions.send(:target_association).should == :magazine end it 'determines target attribute' do @magazine.subscriptions.send(:target_attribute).should == :magazine_ids end it 'associates belongs_to automatically' do @subscription = @magazine.subscriptions.create @subscription.magazine.should == @magazine end end
Version data entries
10 entries across 10 versions & 1 rubygems