Sha256: fd360824c42c6dcfff226c50469669689e1a031f54bc0659fb9b10ebf21998a7

Contents?: true

Size: 947 Bytes

Versions: 2

Compression:

Stored size: 947 Bytes

Contents

require 'spec_helper'

describe CustomerPjHasCustomersPj do
  
 let(:from) { Factory(:customer_pj) }
 let(:to) { Factory(:customer_pj) }
 
 before do
   @customer_pj_has_customers_pj = CustomerPjHasCustomersPj.new from: from,
                                                                to:   to
   
 end
 
 subject { @customer_pj_has_customers_pj }
 
 it { should respond_to(:from) }
 it { should respond_to(:to) }
  
 its(:from) { should  be_a(CustomerPj) }
 its(:to) { should  be_a(CustomerPj) }


 it { @customer_pj_has_customers_pj.from.customer.name.should  be(from.customer.name) }  
 it { @customer_pj_has_customers_pj.to.customer.name.should be(to.customer.name) }
  
  describe "save" do
    before { @customer_pj_has_customers_pj.save }
    it { @customer_pj_has_customers_pj.from.customer.name.should  be(from.customer.name) }  
    it { @customer_pj_has_customers_pj.to.customer.name.should be(to.customer.name) }
  end
  

  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
guara-0.0.3 spec/models/customer_pj_has_customers_pj_spec.rb
guara-0.0.1.rc spec/models/customer_pj_has_customers_pj_spec.rb