require File.dirname(__FILE__) + '/spec_helper.rb' describe Twitter::User do it "should create new user from xml doc" do xml = < 18713 Alex Payne al3x San Francisco, CA Oh, hi. No, I just work here. http://s3.amazonaws.com/twitter_production/profile_images/51961745/al3x_normal.jpg http://www.al3x.net false 2889 Sun May 04 22:38:39 +0000 2008 803453211 @5dots Yes. Give me about 8 hours. *sigh* <a href="http://iconfactory.com/software/twitterrific">twitterrific</a> false 803450314 618923 false EOF u = Twitter::User.new_from_xml(Hpricot.XML(xml)) u.id.should == '18713' u.name.should =='Alex Payne' u.screen_name.should == 'al3x' u.location.should == 'San Francisco, CA' u.description.should == 'Oh, hi. No, I just work here.' u.profile_image_url.should == 'http://s3.amazonaws.com/twitter_production/profile_images/51961745/al3x_normal.jpg' u.url.should == 'http://www.al3x.net' u.protected.should == false u.followers_count.should == '2889' u.status.text.should == '@5dots Yes. Give me about 8 hours. *sigh*' end end