Sha256: 158c369aba0281bac0bdff6e3f01facf6037eb4d9033de7ee8a62eb76bbb25c0
Contents?: true
Size: 778 Bytes
Versions: 3
Compression:
Stored size: 778 Bytes
Contents
require 'spec_helper' module Tim describe ImageVersion do describe "Model relationships" do before (:each) do TargetImage.any_instance.stub(:create_factory_target_image).and_return(true) end it 'should have one base image' do image_version = ImageVersion.new image_version.base_image = BaseImage.new image_version.save! ImageVersion.find(image_version).base_image.should == image_version.base_image end it 'should have many target images' do image_version = ImageVersion.new 2.times do image_version.target_images << TargetImage.new end image_version.save! ImageVersion.find(image_version).target_images.size.should == 2 end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tim-0.1.2 | spec/models/image_version_spec.rb |
tim-0.1.1 | spec/models/image_version_spec.rb |
tim-0.0.1 | spec/models/image_version_spec.rb |