Sha256: 85ef1921c54fd204a5135ec365e42f1034ccde74ac9fa3016d6eeed8c29f8499
Contents?: true
Size: 1.19 KB
Versions: 2
Compression:
Stored size: 1.19 KB
Contents
require 'helper' describe Twitter::API do before do @client = Twitter::Client.new end describe "#activity_about_me" do before do stub_get("/i/activity/about_me.json"). to_return(:body => fixture("about_me.json"), :headers => {:content_type => "application/json; charset=utf-8"}) end it "requests the correct resource" do @client.activity_about_me a_get("/i/activity/about_me.json"). should have_been_made end it "returns activity about me" do activity_about_me = @client.activity_about_me activity_about_me.first.should be_a Twitter::Action::Mention end end describe "#activity_by_friends" do before do stub_get("/i/activity/by_friends.json"). to_return(:body => fixture("by_friends.json"), :headers => {:content_type => "application/json; charset=utf-8"}) end it "requests the correct resource" do @client.activity_by_friends a_get("/i/activity/by_friends.json"). should have_been_made end it "returns activity by friends" do activity_by_friends = @client.activity_by_friends activity_by_friends.first.should be_a Twitter::Action::Favorite end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twitter-4.1.0 | spec/twitter/api/activity_spec.rb |
twitter-4.0.0 | spec/twitter/api/activity_spec.rb |