Sha256: 4136e6354faa06b24e0b7111cf7fff2ac8640bca9f42baa2609f7af30de01a92
Contents?: true
Size: 441 Bytes
Versions: 10
Compression:
Stored size: 441 Bytes
Contents
require 'spec_helper' describe EdgeRider::PreloadAssociations do it 'should preload the given named associations so they are no longer fetched lazily' do forum = Forum.create! topic = Topic.create!(:forum => forum) post = Post.create!(:topic => topic) Forum.preload_associations([forum], :topics => :posts) Topic.should_not_receive(:new) Post.should_not_receive(:new) forum.topics.collect(&:posts) end end
Version data entries
10 entries across 10 versions & 1 rubygems