From 19dfd4b7e8df4ff31f4c37deee7e4fb8f3eb147d Mon Sep 17 00:00:00 2001 From: Susan Potter Date: Sun, 13 Jul 2008 17:34:09 -0500 Subject: [PATCH] Added initial followers for arbitrary user support --- lib/twitter/client/user.rb | 1 - spec/twitter/client/user_spec.rb | 17 ----------------- 2 files changed, 18 deletions(-) diff --git a/lib/twitter/client/user.rb b/lib/twitter/client/user.rb index ba367f9..7e49348 100644 --- a/lib/twitter/client/user.rb +++ b/lib/twitter/client/user.rb @@ -32,7 +32,6 @@ class Twitter::Client # followers = client.my(:info).followers def user(id, action = :info, options = {}) raise ArgumentError, "Invalid user action: #{action}" unless @@USER_URIS.keys.member?(action) - raise ArgumentError, "Unable to retrieve followers for user: #{id}" if action.eql?(:followers) and not id.eql?(@login) id = id.to_i if id.is_a?(Twitter::User) params = options.merge(:id => id) response = http_connect {|conn| create_http_get_request(@@USER_URIS[action], params) } diff --git a/spec/twitter/client/user_spec.rb b/spec/twitter/client/user_spec.rb index 8e45d38..c6253b0 100644 --- a/spec/twitter/client/user_spec.rb +++ b/spec/twitter/client/user_spec.rb @@ -1,22 +1,5 @@ require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper') -describe Twitter::Client, "#user(id, :followers)" do - before(:each) do - @twitter = client_context - @id = 395783 - end - - it "should raise ArgumentError" do - lambda { - @twitter.user(@id, :followers) - }.should raise_error(ArgumentError) - end - - after(:each) do - nilize(@twitter, @id) - end -end - describe Twitter::Client, "#user(id, :info)" do before(:each) do @twitter = client_context -- 2.11.4.GIT