Sha256: 0d0a8b4280d5d6ae646442841cd8839716cc67429b31e4a9d2b867c0ec9e39ce

Contents?: true

Size: 1.58 KB

Versions: 15

Compression:

Stored size: 1.58 KB

Contents

require 'spec_helper'

describe "Person", "converting to xml" do
    
  before do
    @person_a = Caren::Person.new( :external_id => 1, 
                                   :uid => "ABC123", 
                                   :first_name => "Andre", 
                                   :last_name => "Foeken", 
                                   :male => true, 
                                   :date_of_birth => 80.years.ago.to_date,
                                   :address_street => "Sesamestreet 1", 
                                   :address_zipcode => "7500AA", 
                                   :address_city => "Groenlo", 
                                   :address_country => "The Netherlands" )
    
    @person_b = Caren::Person.new( :external_id => 2, 
                                   :uid => "ABC456", 
                                   :first_name => "Oscar", 
                                   :last_name => "Foeken", 
                                   :male => true, 
                                   :date_of_birth => 80.years.ago.to_date,
                                   :address_street => "Sesamestreet 1", 
                                   :address_zipcode => "7500AA", 
                                   :address_city => "Groenlo", 
                                   :address_country => "The Netherlands" )
  end
  
  it "should be able to convert a person to valid xml" do
    @person_a.should convert_to_valid_caren_xml
  end
  
  it "should be able to convert an array of people to valid xml" do
    [@person_a,@person_b].should convert_to_valid_caren_array_xml
  end
  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
caren-api-0.4.6 spec/person_spec.rb
caren-api-0.4.5 spec/person_spec.rb
caren-api-0.4.4 spec/person_spec.rb
caren-api-0.4.3 spec/person_spec.rb
caren-api-0.4.2 spec/person_spec.rb
caren-api-0.4.1 spec/person_spec.rb
caren-api-0.4.0 spec/person_spec.rb
caren-api-0.3.5 spec/person_spec.rb
caren-api-0.3.4 spec/person_spec.rb
caren-api-0.3.3 spec/person_spec.rb
caren-api-0.3.2 spec/person_spec.rb
caren-api-0.3.1 spec/person_spec.rb
caren-api-0.3.0 spec/person_spec.rb
caren-api-0.2.0 spec/person_spec.rb
caren-api-0.1.0 spec/person_spec.rb