dambalah-twitter4r 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +124 -0
- data/MIT-LICENSE +20 -0
- data/README +32 -0
- data/TODO +9 -0
- data/lib/twitter.rb +31 -0
- data/lib/twitter/client.rb +21 -0
- data/lib/twitter/client/account.rb +24 -0
- data/lib/twitter/client/auth.rb +27 -0
- data/lib/twitter/client/base.rb +87 -0
- data/lib/twitter/client/blocks.rb +35 -0
- data/lib/twitter/client/favorites.rb +53 -0
- data/lib/twitter/client/friendship.rb +47 -0
- data/lib/twitter/client/messaging.rb +79 -0
- data/lib/twitter/client/status.rb +46 -0
- data/lib/twitter/client/timeline.rb +72 -0
- data/lib/twitter/client/user.rb +87 -0
- data/lib/twitter/config.rb +71 -0
- data/lib/twitter/console.rb +28 -0
- data/lib/twitter/core.rb +137 -0
- data/lib/twitter/ext.rb +2 -0
- data/lib/twitter/ext/stdlib.rb +51 -0
- data/lib/twitter/extras.rb +39 -0
- data/lib/twitter/meta.rb +56 -0
- data/lib/twitter/model.rb +344 -0
- data/lib/twitter/rails.rb +92 -0
- data/lib/twitter/version.rb +19 -0
- data/spec/twitter/client/auth_spec.rb +34 -0
- data/spec/twitter/client/base_spec.rb +242 -0
- data/spec/twitter/client/blocks_spec.rb +76 -0
- data/spec/twitter/client/favorites_spec.rb +183 -0
- data/spec/twitter/client/friendship_spec.rb +76 -0
- data/spec/twitter/client/messaging_spec.rb +135 -0
- data/spec/twitter/client/status_spec.rb +92 -0
- data/spec/twitter/client/timeline_spec.rb +79 -0
- data/spec/twitter/client/user_spec.rb +203 -0
- data/spec/twitter/client_spec.rb +2 -0
- data/spec/twitter/config_spec.rb +86 -0
- data/spec/twitter/console_spec.rb +15 -0
- data/spec/twitter/core_spec.rb +127 -0
- data/spec/twitter/ext/stdlib_spec.rb +42 -0
- data/spec/twitter/extras_spec.rb +46 -0
- data/spec/twitter/meta_spec.rb +90 -0
- data/spec/twitter/model_spec.rb +464 -0
- data/spec/twitter/rails_spec.rb +110 -0
- data/spec/twitter/version_spec.rb +19 -0
- metadata +109 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
# File that contains extensions to the Twitter4R library directly related to providing
|
2
|
+
# seamless Rails integration.
|
3
|
+
|
4
|
+
if gem_present?('rails', '<= 1.2.6')
|
5
|
+
|
6
|
+
require('active_record/xml_serialization')
|
7
|
+
require('active_support')
|
8
|
+
|
9
|
+
# Extend +String+ with +#xmlize+ method for convenience.
|
10
|
+
class String
|
11
|
+
def xmlize
|
12
|
+
# Forget module/namespace for now as this is totally broken in Rails 1.2.x
|
13
|
+
# (search for namespaced models on the Rails Trac site)
|
14
|
+
cls = self.split('::').pop
|
15
|
+
cls.dasherize.downcase
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# Parent mixin module that defines +InstanceMethods+ for Twitter4R model classes.
|
20
|
+
#
|
21
|
+
# Defines/overrides the following methods for:
|
22
|
+
# * Twitter::RailsPatch::InstanceMethods#to_param
|
23
|
+
# * Twitter::RailsPatch::InstanceMethods#to_xml
|
24
|
+
# * Twitter::RailsPatch::InstanceMethods#to_json
|
25
|
+
module Twitter::RailsPatch
|
26
|
+
class << self
|
27
|
+
def included(base)
|
28
|
+
base.send(:include, InstanceMethods)
|
29
|
+
base.extend ClassMethods
|
30
|
+
end
|
31
|
+
|
32
|
+
module ClassMethods
|
33
|
+
# Dummy method to satisfy ActiveRecord's XmlSerializer.
|
34
|
+
def inheritance_column
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
|
38
|
+
# Returns Hash of name-column pairs
|
39
|
+
def columns_hash
|
40
|
+
{}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
module InstanceMethods
|
45
|
+
# Returns an Array of attribute names of the model
|
46
|
+
def attribute_names
|
47
|
+
self.class.class_eval("@@ATTRIBUTES").collect {|att| att.to_s }
|
48
|
+
end
|
49
|
+
|
50
|
+
# Override default +#to_param+ implementation.
|
51
|
+
def to_param
|
52
|
+
self.id.to_s
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns XML representation of model.
|
56
|
+
def to_xml(options = {})
|
57
|
+
ActiveRecord::XmlSerializer.new(self, options.merge(:root => self.class.name.xmlize)).to_s
|
58
|
+
end
|
59
|
+
|
60
|
+
# Returns JSON representation of model.
|
61
|
+
#
|
62
|
+
# The current implementation basically ignoring +options+, so reopen and override
|
63
|
+
# this implementation or live with it for the moment:)
|
64
|
+
def to_json(options = {})
|
65
|
+
JSON.unparse(self.to_hash)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
class Twitter::User
|
72
|
+
include Twitter::RailsPatch
|
73
|
+
end
|
74
|
+
|
75
|
+
class Twitter::Status
|
76
|
+
include Twitter::RailsPatch
|
77
|
+
end
|
78
|
+
|
79
|
+
class Twitter::Message
|
80
|
+
include Twitter::RailsPatch
|
81
|
+
end
|
82
|
+
|
83
|
+
class Twitter::RESTError
|
84
|
+
include Twitter::RailsPatch
|
85
|
+
alias :id :code
|
86
|
+
def to_hash
|
87
|
+
{ :code => @code, :message => @message, :uri => @uri }
|
88
|
+
end
|
89
|
+
end
|
90
|
+
else
|
91
|
+
warn("WARNING: Twiter4R patch for ActiveRecord defects only supported for Rails 1.2.x currently")
|
92
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# version.rb contains <tt>Twitter::Version</tt> that provides helper
|
2
|
+
# methods related to versioning of the <tt>Twitter4R</tt> project.
|
3
|
+
|
4
|
+
module Twitter::Version #:nodoc:
|
5
|
+
MAJOR = 0
|
6
|
+
MINOR = 3
|
7
|
+
REVISION = 1
|
8
|
+
class << self
|
9
|
+
# Returns X.Y.Z formatted version string
|
10
|
+
def to_version
|
11
|
+
"#{MAJOR}.#{MINOR}.#{REVISION}"
|
12
|
+
end
|
13
|
+
|
14
|
+
# Returns X-Y-Z formatted version name
|
15
|
+
def to_name
|
16
|
+
"#{MAJOR}_#{MINOR}_#{REVISION}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
|
2
|
+
|
3
|
+
describe Twitter::Client, "#authenticate?" do
|
4
|
+
before(:each) do
|
5
|
+
@uri = '/account/verify_credentials.json'
|
6
|
+
@request = mas_net_http_get(:basic_auth => nil)
|
7
|
+
@twitter = client_context
|
8
|
+
@default_header = @twitter.send(:http_header)
|
9
|
+
@response = mas_net_http_response(:success)
|
10
|
+
@error_response = mas_net_http_response(404, "Resource Not Found")
|
11
|
+
@connection = mas_net_http(@response)
|
12
|
+
Net::HTTP.stub!(:new).and_return(@connection)
|
13
|
+
@login = "applestillsucks"
|
14
|
+
@password = "linuxstillrocks"
|
15
|
+
end
|
16
|
+
|
17
|
+
it "creates expected HTTP GET request" do
|
18
|
+
@twitter.should_receive(:create_http_get_request).with(@uri).and_return(@request)
|
19
|
+
@twitter.authenticate?(@login, @password)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should return true if HTTP response is 20X" do
|
23
|
+
@twitter.authenticate?(@login, @password).should be(true)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should return false if HTTP response is not 20X" do
|
27
|
+
Net::HTTP.stub!(:new).and_return(mas_net_http(@error_response))
|
28
|
+
@twitter.authenticate?(@login, @password).should be(false)
|
29
|
+
end
|
30
|
+
|
31
|
+
after(:each) do
|
32
|
+
nilize(@uri, @request, @twitter, @default_header, @response, @error_response, @connection, @login, @password)
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,242 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
|
2
|
+
|
3
|
+
describe "Twitter::Client" do
|
4
|
+
before(:each) do
|
5
|
+
@init_hash = { :login => 'user', :password => 'pass' }
|
6
|
+
end
|
7
|
+
|
8
|
+
it ".new should accept login and password as initializer hash keys and set the values to instance values" do
|
9
|
+
client = nil
|
10
|
+
lambda do
|
11
|
+
client = Twitter::Client.new(@init_hash)
|
12
|
+
end.should_not raise_error
|
13
|
+
client.send(:login).should eql(@init_hash[:login])
|
14
|
+
client.send(:password).should eql(@init_hash[:password])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe Twitter::Client, "#inspect" do
|
19
|
+
before(:each) do
|
20
|
+
@client = Twitter::Client.new(:login => "NippleEquality", :password => "3rdnipple")
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should block out password attribute values" do
|
24
|
+
@client.inspect.should_not match(/@password="3rdnipple"/)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe Twitter::Client, "#http_header" do
|
29
|
+
before(:each) do
|
30
|
+
@user_agent = 'myapp'
|
31
|
+
@application_name = @user_agent
|
32
|
+
@application_version = '1.2.3'
|
33
|
+
@application_url = 'http://myapp.url'
|
34
|
+
Twitter::Client.configure do |conf|
|
35
|
+
conf.user_agent = @user_agent
|
36
|
+
conf.application_name = @application_name
|
37
|
+
conf.application_version = @application_version
|
38
|
+
conf.application_url = @application_url
|
39
|
+
end
|
40
|
+
@expected_headers = {
|
41
|
+
'Accept' => 'text/x-json',
|
42
|
+
'X-Twitter-Client' => @application_name,
|
43
|
+
'X-Twitter-Client-Version' => @application_version,
|
44
|
+
'X-Twitter-Client-URL' => @application_url,
|
45
|
+
'User-Agent' => "Twitter4R v#{Twitter::Version.to_version} [#{@user_agent}]",
|
46
|
+
}
|
47
|
+
@twitter = client_context
|
48
|
+
# reset @@http_header class variable in Twitter::Client class
|
49
|
+
Twitter::Client.class_eval("@@http_header = nil")
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should always return expected HTTP headers" do
|
53
|
+
headers = @twitter.send(:http_header)
|
54
|
+
headers.should === @expected_headers
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should cache HTTP headers Hash in class variable after first invocation" do
|
58
|
+
cache = Twitter::Client.class_eval("@@http_header")
|
59
|
+
cache.should be_nil
|
60
|
+
@twitter.send(:http_header)
|
61
|
+
cache = Twitter::Client.class_eval("@@http_header")
|
62
|
+
cache.should_not be_nil
|
63
|
+
cache.should === @expected_headers
|
64
|
+
end
|
65
|
+
|
66
|
+
after(:each) do
|
67
|
+
nilize(@user_agent, @application_name, @application_version, @application_url, @twitter, @expected_headers)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe Twitter::Client, "#create_http_get_request" do
|
72
|
+
before(:each) do
|
73
|
+
@uri = '/some/path'
|
74
|
+
@expected_get_request = mock(Net::HTTP::Get)
|
75
|
+
@twitter = client_context
|
76
|
+
@default_header = @twitter.send(:http_header)
|
77
|
+
end
|
78
|
+
|
79
|
+
it "should create new Net::HTTP::Get object with expected initialization arguments" do
|
80
|
+
Net::HTTP::Get.should_receive(:new).with(@uri, @default_header).and_return(@expected_get_request)
|
81
|
+
@twitter.send(:create_http_get_request, @uri)
|
82
|
+
end
|
83
|
+
|
84
|
+
after(:each) do
|
85
|
+
nilize(@twitter, @uri, @expected_get_request, @default_header)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe Twitter::Client, "#create_http_post_request" do
|
90
|
+
before(:each) do
|
91
|
+
@uri = '/some/path'
|
92
|
+
@expected_post_request = mock(Net::HTTP::Post)
|
93
|
+
@twitter = client_context
|
94
|
+
@default_header = @twitter.send(:http_header)
|
95
|
+
end
|
96
|
+
|
97
|
+
it "should create new Net::HTTP::Post object with expected initialization arguments" do
|
98
|
+
Net::HTTP::Post.should_receive(:new).with(@uri, @default_header).and_return(@expected_post_request)
|
99
|
+
@twitter.send(:create_http_post_request, @uri)
|
100
|
+
end
|
101
|
+
|
102
|
+
after(:each) do
|
103
|
+
nilize(@twitter, @uri, @expected_post_request, @default_header)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
describe Twitter::Client, "#create_http_delete_request" do
|
108
|
+
before(:each) do
|
109
|
+
@uri = '/a/stupid/path/that/is/not/restful/since/twitter.com/cannot/do/consistent/restful/apis'
|
110
|
+
@expected_delete_request = mock(Net::HTTP::Delete)
|
111
|
+
@twitter = client_context
|
112
|
+
@default_header = @twitter.send(:http_header)
|
113
|
+
end
|
114
|
+
|
115
|
+
it "should create new Net::HTTP::Delete object with expected initialization arguments" do
|
116
|
+
Net::HTTP::Delete.should_receive(:new).with(@uri, @default_header).and_return(@expected_delete_request)
|
117
|
+
@twitter.send(:create_http_delete_request, @uri)
|
118
|
+
end
|
119
|
+
|
120
|
+
after(:each) do
|
121
|
+
nilize(@twitter, @uri, @expected_delete_request, @default_header)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe Twitter::Client, "#http_connect" do
|
126
|
+
before(:each) do
|
127
|
+
@request = mas_net_http_get(:basic_auth => nil)
|
128
|
+
@good_response = mas_net_http_response(:success)
|
129
|
+
@bad_response = mas_net_http_response(:server_error)
|
130
|
+
@http_stubs = {:is_a? => true}
|
131
|
+
@block = Proc.new do |conn|
|
132
|
+
conn.is_a?(Net::HTTP).should be(true)
|
133
|
+
@has_yielded = true
|
134
|
+
@request
|
135
|
+
end
|
136
|
+
@twitter = client_context
|
137
|
+
@has_yielded = false
|
138
|
+
end
|
139
|
+
|
140
|
+
def generate_bad_response
|
141
|
+
@http = mas_net_http(@bad_response, @http_stubs)
|
142
|
+
Net::HTTP.stub!(:new).and_return(@http)
|
143
|
+
end
|
144
|
+
|
145
|
+
def generate_good_response
|
146
|
+
@http = mas_net_http(@good_response, @http_stubs)
|
147
|
+
Net::HTTP.stub!(:new).and_return(@http)
|
148
|
+
end
|
149
|
+
|
150
|
+
it "should yield HTTP connection when response is good" do
|
151
|
+
generate_good_response
|
152
|
+
@http.should_receive(:is_a?).with(Net::HTTP).and_return(true)
|
153
|
+
lambda do
|
154
|
+
@twitter.send(:http_connect, &@block)
|
155
|
+
end.should_not raise_error
|
156
|
+
@has_yielded.should be(true)
|
157
|
+
end
|
158
|
+
|
159
|
+
it "should yield HTTP connection when response is bad" do
|
160
|
+
generate_bad_response
|
161
|
+
@http.should_receive(:is_a?).with(Net::HTTP).and_return(true)
|
162
|
+
lambda {
|
163
|
+
@twitter.send(:http_connect, &@block)
|
164
|
+
}.should raise_error(Twitter::RESTError)
|
165
|
+
@has_yielded.should be(true)
|
166
|
+
end
|
167
|
+
|
168
|
+
after(:each) do
|
169
|
+
nilize(@good_response, @bad_response, @http)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe Twitter::Client, "#bless_model" do
|
174
|
+
before(:each) do
|
175
|
+
@twitter = client_context
|
176
|
+
@model = Twitter::User.new
|
177
|
+
end
|
178
|
+
|
179
|
+
it "should recieve #client= message on given model to self" do
|
180
|
+
@model.should_receive(:client=).with(@twitter)
|
181
|
+
model = @twitter.send(:bless_model, @model)
|
182
|
+
end
|
183
|
+
|
184
|
+
it "should set client attribute on given model to self" do
|
185
|
+
model = @twitter.send(:bless_model, @model)
|
186
|
+
model.client.should eql(@twitter)
|
187
|
+
end
|
188
|
+
|
189
|
+
# if model is nil, it doesn't not necessarily signify an exceptional case for this method's usage.
|
190
|
+
it "should return nil when receiving nil and not raise any exceptions" do
|
191
|
+
model = @twitter.send(:bless_model, nil)
|
192
|
+
model.should be_nil
|
193
|
+
end
|
194
|
+
|
195
|
+
# needed to alert developer that the model needs to respond to #client= messages appropriately.
|
196
|
+
it "should raise an error if passing in a non-nil object that doesn't not respond to the :client= message" do
|
197
|
+
lambda {
|
198
|
+
@twitter.send(:bless_model, Object.new)
|
199
|
+
}.should raise_error(NoMethodError)
|
200
|
+
end
|
201
|
+
|
202
|
+
after(:each) do
|
203
|
+
nilize(@twitter)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
describe Twitter::Client, "#bless_models" do
|
208
|
+
before(:each) do
|
209
|
+
@twitter = client_context
|
210
|
+
@models = [
|
211
|
+
Twitter::Status.new(:text => 'message #1'),
|
212
|
+
Twitter::Status.new(:text => 'message #2'),
|
213
|
+
]
|
214
|
+
end
|
215
|
+
|
216
|
+
it "should set client attributes for each model in given Array to self" do
|
217
|
+
models = @twitter.send(:bless_models, @models)
|
218
|
+
models.each {|model| model.client.should eql(@twitter) }
|
219
|
+
end
|
220
|
+
|
221
|
+
it "should set client attribute for singular model given to self" do
|
222
|
+
model = @twitter.send(:bless_models, @models[0])
|
223
|
+
model.client.should eql(@twitter)
|
224
|
+
end
|
225
|
+
|
226
|
+
it "should delegate to bless_model for singular model case" do
|
227
|
+
model = @models[0]
|
228
|
+
@twitter.should_receive(:bless_model).with(model).and_return(model)
|
229
|
+
@twitter.send(:bless_models, model)
|
230
|
+
end
|
231
|
+
|
232
|
+
it "should return nil when receiving nil and not raise any exceptions" do
|
233
|
+
lambda {
|
234
|
+
value = @twitter.send(:bless_models, nil)
|
235
|
+
value.should be_nil
|
236
|
+
}.should_not raise_error
|
237
|
+
end
|
238
|
+
|
239
|
+
after(:each) do
|
240
|
+
nilize(@twitter, @models)
|
241
|
+
end
|
242
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
|
2
|
+
|
3
|
+
describe Twitter::Client, "#block" do
|
4
|
+
before(:each) do
|
5
|
+
@twitter = client_context
|
6
|
+
@id = 1234567
|
7
|
+
@screen_name = 'dummylogin'
|
8
|
+
@friend = Twitter::User.new(:id => @id, :screen_name => @screen_name)
|
9
|
+
@uris = Twitter::Client.class_eval("@@BLOCK_URIS")
|
10
|
+
@request = mas_net_http_get(:basic_auth => nil)
|
11
|
+
@response = mas_net_http_response(:success)
|
12
|
+
@connection = mas_net_http(@response)
|
13
|
+
Net::HTTP.stub!(:new).and_return(@connection)
|
14
|
+
Twitter::User.stub!(:unmarshal).and_return(@friend)
|
15
|
+
end
|
16
|
+
|
17
|
+
def create_uri(action, id)
|
18
|
+
"#{@uris[action]}/#{id}.json"
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should create expected HTTP GET request for :add case using integer user ID" do
|
22
|
+
# the integer user ID scenario...
|
23
|
+
@twitter.should_receive(:create_http_get_request).with(create_uri(:add, @id)).and_return(@request)
|
24
|
+
@twitter.block(:add, @id)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should create expected HTTP GET request for :add case using screen name" do
|
28
|
+
# the screen name scenario...
|
29
|
+
@twitter.should_receive(:create_http_get_request).with(create_uri(:add, @screen_name)).and_return(@request)
|
30
|
+
@twitter.block(:add, @screen_name)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should create expected HTTP GET request for :add case using Twitter::User object" do
|
34
|
+
# the Twitter::User object scenario...
|
35
|
+
@twitter.should_receive(:create_http_get_request).with(create_uri(:add, @friend.to_i)).and_return(@request)
|
36
|
+
@twitter.block(:add, @friend)
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should create expected HTTP GET request for :remove case using integer user ID" do
|
40
|
+
# the integer user ID scenario...
|
41
|
+
@twitter.should_receive(:create_http_get_request).with(create_uri(:remove, @id)).and_return(@request)
|
42
|
+
@twitter.block(:remove, @id)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should create expected HTTP GET request for :remove case using screen name" do
|
46
|
+
# the screen name scenario...
|
47
|
+
@twitter.should_receive(:create_http_get_request).with(create_uri(:remove, @screen_name)).and_return(@request)
|
48
|
+
@twitter.block(:remove, @screen_name)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should create expected HTTP GET request for :remove case using Twitter::User object" do
|
52
|
+
# the Twitter::User object scenario...
|
53
|
+
@twitter.should_receive(:create_http_get_request).with(create_uri(:remove, @friend.to_i)).and_return(@request)
|
54
|
+
@twitter.block(:remove, @friend)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should bless user model returned for :add case" do
|
58
|
+
@twitter.should_receive(:bless_model).with(@friend)
|
59
|
+
@twitter.block(:add, @friend)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should bless user model returned for :remove case" do
|
63
|
+
@twitter.should_receive(:bless_model).with(@friend)
|
64
|
+
@twitter.block(:remove, @friend)
|
65
|
+
end
|
66
|
+
|
67
|
+
it "should raise ArgumentError if action given is not valid" do
|
68
|
+
lambda {
|
69
|
+
@twitter.block(:crap, @friend)
|
70
|
+
}.should raise_error(ArgumentError)
|
71
|
+
end
|
72
|
+
|
73
|
+
after(:each) do
|
74
|
+
nilize(@twitter, @id, @uris, @request, @response, @connection)
|
75
|
+
end
|
76
|
+
end
|