Sha256: 59b5ea7c471a0c6339220c082f1d8e11330cedb49068eea44cc9328841fe1554
Contents?: true
Size: 723 Bytes
Versions: 1
Compression:
Stored size: 723 Bytes
Contents
require 'spec_helper' describe Petfinder::Pet do before do @shelter = Petfinder::Shelter.new(Nokogiri::XML(fixture_file('shelter.xml'))) end it "should populate attributes of shelter" do [:id, :name, :address1, :address2, :city, :state, :zip, :country, :latitude, :longitude, :phone, :fax, :email].each do |attr| @shelter.send(attr).should_not == "" end end it "should populate multiple shelter objects" do shelters = Petfinder::Shelter.multiple(Nokogiri::XML(fixture_file('shelter_list.xml'))) shelters.should have(25).items end it "should return a friendly inspect" do @shelter.inspect.should eq("#<Shelter id: 'TX1356', name: 'Lucky Dog Rescue', state: 'TX'>") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
petfinder-1.0.3 | spec/shelter_spec.rb |