Sha256: 85268ad02a92786e9fc762776cc93e4f1b409b9656b534a5504e54570138f3f5
Contents?: true
Size: 721 Bytes
Versions: 1
Compression:
Stored size: 721 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.count.should eq(25) 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.4 | spec/shelter_spec.rb |