Sha256: d306a623d3c667d2fbfd20ac340b98a29b97f110bb1d516aeae135d5eb00c364

Contents?: true

Size: 590 Bytes

Versions: 2

Compression:

Stored size: 590 Bytes

Contents

require 'spec_helper'

describe ProviderType do
  describe "Dummy Model relationships" do
    before (:each) do
      Tim::TargetImage.any_instance.stub(:create_factory_target_image).and_return(true)
      Tim::TargetImage.any_instance.stub(:imported?).and_return(false)
    end

    it 'should have many target images' do
      provider_type = ProviderType.new
      2.times do
        provider_type.target_images << FactoryGirl.build(:target_image_with_full_tree)
      end
      provider_type.save!
      ProviderType.find(provider_type).target_images.size.should == 2
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tim-0.3.0 spec/models/dummy/provider_type_spec.rb
tim-0.2.0 spec/models/dummy/provider_type_spec.rb