spec/twitter/model_spec.rb in dambalah-twitter4r-0.3.2 vs spec/twitter/model_spec.rb in dambalah-twitter4r-0.3.3

- old
+ new

@@ -431,12 +431,35 @@ after(:each) do nilize(@twitter, @user, @friend) end end +describe Twitter::Status, "#reply?" do + before(:each) do + @status = Twitter::Status.new( + :id => 123456789, + :text => "Wazzup?", + :user => mock(Twitter::User) + ) + @reply = Twitter::Status.new( + :text => "No much bro. You?", + :user => mock(Twitter::User), + :in_reply_to_status_id => @status.id + ) + end + + it "should return false for the original status" do + @status.reply?.should be(false) + end + + it "should return true for the reply to the original status" do + @reply.reply?.should be(true) + end +end + describe Twitter::Status, "#to_s" do before(:each) do - @text = 'Aloha' + @text = 'Aloha' @status = Twitter::Status.new(:text => @text) end it "should render text attribute" do @status.to_s.should be(@text)