require File.dirname(__FILE__) + '/spec_helper.rb' describe Twitter::Status do it "should create new status from xml doc" do xml = < Sun May 04 21:59:52 +0000 2008 803435310 Writing tests (rspec) for the twitter gem that all can run. Wish I would have done this when I wrote it years back. <a href="http://iconfactory.com/software/twitterrific">twitterrific</a> false false 4243 John Nunemaker jnunemaker Indiana Loves his wife, ruby, notre dame football and iu basketball http://s3.amazonaws.com/twitter_production/profile_images/52619256/ruby_enterprise_shirt_normal.jpg http://addictedtonew.com false 363 EOF s = Twitter::Status.new_from_xml(Hpricot.XML(xml)) s.id.should == '803435310' s.created_at.should == 'Sun May 04 21:59:52 +0000 2008' s.text.should == 'Writing tests (rspec) for the twitter gem that all can run. Wish I would have done this when I wrote it years back.' s.source.should == '<a href="http://iconfactory.com/software/twitterrific">twitterrific</a>' s.truncated.should == false s.in_reply_to_status_id.should == '' s.in_reply_to_user_id.should == '' s.favorited.should == false s.user.id.should == '4243' s.user.name.should == 'John Nunemaker' end end