Sha256: 35268e075a62cc1ec5dea8760dc591469ec75990e50c3671204b46e0a6b2e1fd
Contents?: true
Size: 819 Bytes
Versions: 7
Compression:
Stored size: 819 Bytes
Contents
require 'spec_helper' describe TweetStream::DirectMessage do it 'modifies the :sender key into a TweetStream::User object called #user' do @status = TweetStream::DirectMessage.new({:sender => {:screen_name => 'bob'}}) @status.user.should be_kind_of(TweetStream::User) @status.user.screen_name.should == 'bob' end it 'transforms the sender into a TweetStream::User object called #sender' do @status = TweetStream::DirectMessage.new({:sender => {:screen_name => 'bob'}}) @status.sender.should be_kind_of(TweetStream::User) @status.sender.screen_name.should == 'bob' end it 'overrides the #id method for itself and the user' do @status = TweetStream::DirectMessage.new({:id => 123, :sender => {:id => 345}}) @status.id.should == 123 @status.user.id.should == 345 end end
Version data entries
7 entries across 7 versions & 1 rubygems