twitter 5.9.0 → 5.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe Twitter::DirectMessage do
5
-
6
5
  before do
7
6
  @old_stderr = $stderr
8
7
  $stderr = StringIO.new
@@ -137,10 +136,6 @@ describe Twitter::DirectMessage do
137
136
  hashtags = Twitter::DirectMessage.new(:id => 1_825_786_345).hashtags
138
137
  expect(hashtags).to be_empty
139
138
  end
140
- it 'warns when not set' do
141
- Twitter::DirectMessage.new(:id => 1_825_786_345).hashtags
142
- expect($stderr.string).to match(/To get hashtags, you must pass `:include_entities => true` when requesting the Twitter::DirectMessage\./)
143
- end
144
139
  end
145
140
 
146
141
  describe '#media' do
@@ -153,10 +148,6 @@ describe Twitter::DirectMessage do
153
148
  media = Twitter::DirectMessage.new(:id => 1_825_786_345).media
154
149
  expect(media).to be_empty
155
150
  end
156
- it 'warns when not set' do
157
- Twitter::DirectMessage.new(:id => 1_825_786_345).media
158
- expect($stderr.string).to match(/To get media, you must pass `:include_entities => true` when requesting the Twitter::DirectMessage\./)
159
- end
160
151
  end
161
152
 
162
153
  describe '#symbols' do
@@ -176,10 +167,6 @@ describe Twitter::DirectMessage do
176
167
  symbols = Twitter::DirectMessage.new(:id => 1_825_786_345).symbols
177
168
  expect(symbols).to be_empty
178
169
  end
179
- it 'warns when not set' do
180
- Twitter::DirectMessage.new(:id => 1_825_786_345).symbols
181
- expect($stderr.string).to match(/To get symbols, you must pass `:include_entities => true` when requesting the Twitter::DirectMessage\./)
182
- end
183
170
  end
184
171
 
185
172
  describe '#uris' do
@@ -203,10 +190,6 @@ describe Twitter::DirectMessage do
203
190
  direct_message = Twitter::DirectMessage.new(:id => 1_825_786_345)
204
191
  expect(direct_message.uris).to be_empty
205
192
  end
206
- it 'warns when not set' do
207
- Twitter::DirectMessage.new(:id => 1_825_786_345).urls
208
- expect($stderr.string).to match(/To get urls, you must pass `:include_entities => true` when requesting the Twitter::DirectMessage\./)
209
- end
210
193
  it 'can handle strange urls' do
211
194
  urls_array = [
212
195
  {
@@ -245,10 +228,5 @@ describe Twitter::DirectMessage do
245
228
  user_mentions = Twitter::DirectMessage.new(:id => 1_825_786_345).user_mentions
246
229
  expect(user_mentions).to be_empty
247
230
  end
248
- it 'warns when not set' do
249
- Twitter::DirectMessage.new(:id => 1_825_786_345).user_mentions
250
- expect($stderr.string).to match(/To get user mentions, you must pass `:include_entities => true` when requesting the Twitter::DirectMessage\./)
251
- end
252
231
  end
253
-
254
232
  end
@@ -163,7 +163,7 @@ describe Twitter::REST::Client do
163
163
 
164
164
  describe '#oauth_auth_header' do
165
165
  it 'creates the correct auth headers' do
166
- uri = Twitter::REST::Client::ENDPOINT + '/1.1/direct_messages.json'
166
+ uri = Twitter::REST::Client::URL_PREFIX + '/1.1/direct_messages.json'
167
167
  authorization = @client.send(:oauth_auth_header, :get, uri)
168
168
  expect(authorization.options[:signature_method]).to eq('HMAC-SHA1')
169
169
  expect(authorization.options[:version]).to eq('1.0')
@@ -1,3 +1,4 @@
1
+ # coding: utf-8
1
2
  require 'helper'
2
3
 
3
4
  describe Twitter::REST::Favorites do
@@ -64,7 +65,7 @@ describe Twitter::REST::Favorites do
64
65
  tweets = @client.unfavorite(25_938_088_801)
65
66
  expect(tweets).to be_an Array
66
67
  expect(tweets.first).to be_a Twitter::Tweet
67
- expect(tweets.first.text).to eq("The problem with your code is that it's doing exactly what you told it to do.")
68
+ expect(tweets.first.text).to eq("\"I hope you'll keep...building bonds of friendship that will enrich your lives & enrich our world\" —FLOTUS in China, http://t.co/fxmuQN9JL9")
68
69
  end
69
70
  context 'with a URI object passed' do
70
71
  it 'requests the correct resource' do
@@ -100,7 +101,7 @@ describe Twitter::REST::Favorites do
100
101
  tweets = @client.favorite(25_938_088_801)
101
102
  expect(tweets).to be_an Array
102
103
  expect(tweets.first).to be_a Twitter::Tweet
103
- expect(tweets.first.text).to eq("The problem with your code is that it's doing exactly what you told it to do.")
104
+ expect(tweets.first.text).to eq("\"I hope you'll keep...building bonds of friendship that will enrich your lives & enrich our world\" —FLOTUS in China, http://t.co/fxmuQN9JL9")
104
105
  end
105
106
  context 'already favorited' do
106
107
  before do
@@ -144,7 +145,7 @@ describe Twitter::REST::Favorites do
144
145
  tweets = @client.favorite!(25_938_088_801)
145
146
  expect(tweets).to be_an Array
146
147
  expect(tweets.first).to be_a Twitter::Tweet
147
- expect(tweets.first.text).to eq("The problem with your code is that it's doing exactly what you told it to do.")
148
+ expect(tweets.first.text).to eq("\"I hope you'll keep...building bonds of friendship that will enrich your lives & enrich our world\" —FLOTUS in China, http://t.co/fxmuQN9JL9")
148
149
  end
149
150
  context 'forbidden' do
150
151
  before do
@@ -52,12 +52,12 @@ describe Twitter::REST::FriendsAndFollowers do
52
52
  end
53
53
  context 'without arguments passed' do
54
54
  before do
55
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
55
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
56
56
  stub_get('/1.1/friends/ids.json').with(:query => {:user_id => '7505382', :cursor => '-1'}).to_return(:body => fixture('ids_list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
57
57
  end
58
58
  it 'requests the correct resource' do
59
59
  @client.friend_ids
60
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
60
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
61
61
  expect(a_get('/1.1/friends/ids.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
62
62
  end
63
63
  it 'returns an array of numeric IDs for every user the specified user is following' do
@@ -71,7 +71,7 @@ describe Twitter::REST::FriendsAndFollowers do
71
71
  end
72
72
  it 'requests the correct resource' do
73
73
  @client.friend_ids.each {}
74
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
74
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
75
75
  expect(a_get('/1.1/friends/ids.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
76
76
  expect(a_get('/1.1/friends/ids.json').with(:query => {:user_id => '7505382', :cursor => '1305102810874389703'})).to have_been_made
77
77
  end
@@ -125,12 +125,12 @@ describe Twitter::REST::FriendsAndFollowers do
125
125
  end
126
126
  context 'without arguments passed' do
127
127
  before do
128
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
128
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
129
129
  stub_get('/1.1/followers/ids.json').with(:query => {:user_id => '7505382', :cursor => '-1'}).to_return(:body => fixture('ids_list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
130
130
  end
131
131
  it 'requests the correct resource' do
132
132
  @client.follower_ids
133
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
133
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
134
134
  expect(a_get('/1.1/followers/ids.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
135
135
  end
136
136
  it 'returns an array of numeric IDs for every user following the specified user' do
@@ -144,7 +144,7 @@ describe Twitter::REST::FriendsAndFollowers do
144
144
  end
145
145
  it 'requests the correct resource' do
146
146
  @client.follower_ids.each {}
147
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
147
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
148
148
  expect(a_get('/1.1/followers/ids.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
149
149
  expect(a_get('/1.1/followers/ids.json').with(:query => {:user_id => '7505382', :cursor => '1305102810874389703'})).to have_been_made
150
150
  end
@@ -294,14 +294,14 @@ describe Twitter::REST::FriendsAndFollowers do
294
294
 
295
295
  describe '#follow' do
296
296
  before do
297
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
297
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
298
298
  stub_get('/1.1/friends/ids.json').with(:query => {:user_id => '7505382', :cursor => '-1'}).to_return(:body => fixture('ids_list2.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
299
299
  stub_post('/1.1/users/lookup.json').with(:body => {:screen_name => 'sferik,pengwynn'}).to_return(:body => fixture('friendships.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
300
300
  stub_post('/1.1/friendships/create.json').with(:body => {:user_id => '7505382'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
301
301
  end
302
302
  it 'requests the correct resource' do
303
303
  @client.follow('sferik', 'pengwynn')
304
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
304
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
305
305
  expect(a_get('/1.1/friends/ids.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
306
306
  expect(a_post('/1.1/users/lookup.json').with(:body => {:screen_name => 'sferik,pengwynn'})).to have_been_made
307
307
  expect(a_post('/1.1/friendships/create.json').with(:body => {:user_id => '7505382'})).to have_been_made
@@ -545,12 +545,12 @@ describe Twitter::REST::FriendsAndFollowers do
545
545
  end
546
546
  context 'without arguments passed' do
547
547
  before do
548
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
548
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
549
549
  stub_get('/1.1/followers/list.json').with(:query => {:user_id => '7505382', :cursor => '-1'}).to_return(:body => fixture('followers_list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
550
550
  end
551
551
  it 'requests the correct resource' do
552
552
  @client.followers
553
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
553
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
554
554
  expect(a_get('/1.1/followers/list.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
555
555
  end
556
556
  it 'returns a cursor of followers with details for every user the specified user is followed by' do
@@ -564,7 +564,7 @@ describe Twitter::REST::FriendsAndFollowers do
564
564
  end
565
565
  it 'requests the correct resource' do
566
566
  @client.followers.each {}
567
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
567
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
568
568
  expect(a_get('/1.1/followers/list.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
569
569
  expect(a_get('/1.1/followers/list.json').with(:query => {:user_id => '7505382', :cursor => '1419103567112105362'})).to have_been_made
570
570
  end
@@ -618,12 +618,12 @@ describe Twitter::REST::FriendsAndFollowers do
618
618
  end
619
619
  context 'without arguments passed' do
620
620
  before do
621
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
621
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
622
622
  stub_get('/1.1/friends/list.json').with(:query => {:user_id => '7505382', :cursor => '-1'}).to_return(:body => fixture('friends_list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
623
623
  end
624
624
  it 'requests the correct resource' do
625
625
  @client.friends
626
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
626
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
627
627
  expect(a_get('/1.1/friends/list.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
628
628
  end
629
629
  it 'returns a cursor of friends with details for every user the specified user is following' do
@@ -637,7 +637,7 @@ describe Twitter::REST::FriendsAndFollowers do
637
637
  end
638
638
  it 'requests the correct resource' do
639
639
  @client.friends.each {}
640
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
640
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
641
641
  expect(a_get('/1.1/friends/list.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
642
642
  expect(a_get('/1.1/friends/list.json').with(:query => {:user_id => '7505382', :cursor => '1418947360875712729'})).to have_been_made
643
643
  end
@@ -67,12 +67,12 @@ describe Twitter::REST::Lists do
67
67
  end
68
68
  context 'without a screen name passed' do
69
69
  before do
70
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
70
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
71
71
  stub_get('/1.1/lists/statuses.json').with(:query => {:owner_id => '7505382', :slug => 'presidents'}).to_return(:body => fixture('statuses.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
72
72
  end
73
73
  it 'requests the correct resource' do
74
74
  @client.list_timeline('presidents')
75
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
75
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
76
76
  expect(a_get('/1.1/lists/statuses.json').with(:query => {:owner_id => '7505382', :slug => 'presidents'})).to have_been_made
77
77
  end
78
78
  end
@@ -95,12 +95,12 @@ describe Twitter::REST::Lists do
95
95
  end
96
96
  context 'without a screen name passed' do
97
97
  before do
98
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
98
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
99
99
  stub_post('/1.1/lists/members/destroy.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
100
100
  end
101
101
  it 'requests the correct resource' do
102
102
  @client.remove_list_member('presidents', 813_286)
103
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
103
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
104
104
  expect(a_post('/1.1/lists/members/destroy.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286'})).to have_been_made
105
105
  end
106
106
  end
@@ -153,12 +153,12 @@ describe Twitter::REST::Lists do
153
153
  end
154
154
  context 'without a screen name passed' do
155
155
  before do
156
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
156
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
157
157
  stub_get('/1.1/lists/memberships.json').with(:query => {:user_id => '7505382', :cursor => '-1'}).to_return(:body => fixture('memberships.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
158
158
  end
159
159
  it 'requests the correct resource' do
160
160
  @client.memberships
161
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
161
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
162
162
  expect(a_get('/1.1/lists/memberships.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
163
163
  end
164
164
  context 'with each' do
@@ -167,7 +167,7 @@ describe Twitter::REST::Lists do
167
167
  end
168
168
  it 'requests the correct resource' do
169
169
  @client.memberships.each {}
170
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
170
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
171
171
  expect(a_get('/1.1/lists/memberships.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
172
172
  expect(a_get('/1.1/lists/memberships.json').with(:query => {:user_id => '7505382', :cursor => '1401037770457540712'})).to have_been_made
173
173
  end
@@ -222,12 +222,12 @@ describe Twitter::REST::Lists do
222
222
  end
223
223
  context 'without a screen name passed' do
224
224
  before do
225
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
225
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
226
226
  stub_get('/1.1/lists/subscribers.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :cursor => '-1'}).to_return(:body => fixture('users_list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
227
227
  end
228
228
  it 'requests the correct resource' do
229
229
  @client.list_subscribers('presidents')
230
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
230
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
231
231
  expect(a_get('/1.1/lists/subscribers.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :cursor => '-1'})).to have_been_made
232
232
  end
233
233
  context 'with each' do
@@ -236,7 +236,7 @@ describe Twitter::REST::Lists do
236
236
  end
237
237
  it 'requests the correct resource' do
238
238
  @client.list_subscribers('presidents').each {}
239
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
239
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
240
240
  expect(a_get('/1.1/lists/subscribers.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :cursor => '-1'})).to have_been_made
241
241
  expect(a_get('/1.1/lists/subscribers.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :cursor => '1322801608223717003'})).to have_been_made
242
242
  end
@@ -261,12 +261,12 @@ describe Twitter::REST::Lists do
261
261
  end
262
262
  context 'without a screen name passed' do
263
263
  before do
264
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
264
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
265
265
  stub_post('/1.1/lists/subscribers/create.json').with(:body => {:owner_id => '7505382', :slug => 'presidents'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
266
266
  end
267
267
  it 'requests the correct resource' do
268
268
  @client.list_subscribe('presidents')
269
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
269
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
270
270
  expect(a_post('/1.1/lists/subscribers/create.json').with(:body => {:owner_id => '7505382', :slug => 'presidents'})).to have_been_made
271
271
  end
272
272
  end
@@ -335,12 +335,12 @@ describe Twitter::REST::Lists do
335
335
  end
336
336
  context 'without a screen name passed' do
337
337
  before do
338
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
338
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
339
339
  stub_get('/1.1/lists/subscribers/show.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
340
340
  end
341
341
  it 'requests the correct resource' do
342
342
  @client.list_subscriber?('presidents', 813_286)
343
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
343
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
344
344
  expect(a_get('/1.1/lists/subscribers/show.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286'})).to have_been_made
345
345
  end
346
346
  end
@@ -363,12 +363,12 @@ describe Twitter::REST::Lists do
363
363
  end
364
364
  context 'without a screen name passed' do
365
365
  before do
366
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
366
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
367
367
  stub_post('/1.1/lists/subscribers/destroy.json').with(:body => {:owner_id => '7505382', :slug => 'presidents'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
368
368
  end
369
369
  it 'requests the correct resource' do
370
370
  @client.list_unsubscribe('presidents')
371
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
371
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
372
372
  expect(a_post('/1.1/lists/subscribers/destroy.json').with(:body => {:owner_id => '7505382', :slug => 'presidents'})).to have_been_made
373
373
  end
374
374
  end
@@ -400,12 +400,12 @@ describe Twitter::REST::Lists do
400
400
  end
401
401
  context 'without a screen name passed' do
402
402
  before do
403
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
403
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
404
404
  stub_post('/1.1/lists/members/create_all.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286,18755393'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
405
405
  end
406
406
  it 'requests the correct resource' do
407
407
  @client.add_list_members('presidents', [813_286, 18_755_393])
408
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
408
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
409
409
  expect(a_post('/1.1/lists/members/create_all.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286,18755393'})).to have_been_made
410
410
  end
411
411
  end
@@ -474,12 +474,12 @@ describe Twitter::REST::Lists do
474
474
  end
475
475
  context 'without a screen name passed' do
476
476
  before do
477
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
477
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
478
478
  stub_get('/1.1/lists/members/show.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
479
479
  end
480
480
  it 'requests the correct resource' do
481
481
  @client.list_member?('presidents', 813_286)
482
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
482
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
483
483
  expect(a_get('/1.1/lists/members/show.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286'})).to have_been_made
484
484
  end
485
485
  end
@@ -532,12 +532,12 @@ describe Twitter::REST::Lists do
532
532
  end
533
533
  context 'without a screen name passed' do
534
534
  before do
535
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
535
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
536
536
  stub_get('/1.1/lists/members.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :cursor => '-1'}).to_return(:body => fixture('users_list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
537
537
  end
538
538
  it 'requests the correct resource' do
539
539
  @client.list_members('presidents')
540
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
540
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
541
541
  expect(a_get('/1.1/lists/members.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :cursor => '-1'})).to have_been_made
542
542
  end
543
543
  context 'with each' do
@@ -546,7 +546,7 @@ describe Twitter::REST::Lists do
546
546
  end
547
547
  it 'requests the correct resource' do
548
548
  @client.list_members('presidents').each {}
549
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
549
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
550
550
  expect(a_get('/1.1/lists/members.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :cursor => '-1'})).to have_been_made
551
551
  expect(a_get('/1.1/lists/members.json').with(:query => {:owner_id => '7505382', :slug => 'presidents', :cursor => '1322801608223717003'})).to have_been_made
552
552
  end
@@ -571,12 +571,12 @@ describe Twitter::REST::Lists do
571
571
  end
572
572
  context 'without a screen name passed' do
573
573
  before do
574
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
574
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
575
575
  stub_post('/1.1/lists/members/create.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
576
576
  end
577
577
  it 'requests the correct resource' do
578
578
  @client.add_list_member('presidents', 813_286)
579
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
579
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
580
580
  expect(a_post('/1.1/lists/members/create.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286'})).to have_been_made
581
581
  end
582
582
  end
@@ -599,12 +599,12 @@ describe Twitter::REST::Lists do
599
599
  end
600
600
  context 'without a screen name passed' do
601
601
  before do
602
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
602
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
603
603
  stub_post('/1.1/lists/destroy.json').with(:body => {:owner_id => '7505382', :slug => 'presidents'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
604
604
  end
605
605
  it 'requests the correct resource' do
606
606
  @client.destroy_list('presidents')
607
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
607
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
608
608
  expect(a_post('/1.1/lists/destroy.json').with(:body => {:owner_id => '7505382', :slug => 'presidents'})).to have_been_made
609
609
  end
610
610
  end
@@ -646,12 +646,12 @@ describe Twitter::REST::Lists do
646
646
  end
647
647
  context 'without a screen name passed' do
648
648
  before do
649
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
649
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
650
650
  stub_post('/1.1/lists/update.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :description => 'Presidents of the United States of America'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
651
651
  end
652
652
  it 'requests the correct resource' do
653
653
  @client.list_update('presidents', :description => 'Presidents of the United States of America')
654
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
654
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
655
655
  expect(a_post('/1.1/lists/update.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :description => 'Presidents of the United States of America'})).to have_been_made
656
656
  end
657
657
  end
@@ -727,12 +727,12 @@ describe Twitter::REST::Lists do
727
727
  end
728
728
  context 'without a screen name passed' do
729
729
  before do
730
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
730
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
731
731
  stub_get('/1.1/lists/show.json').with(:query => {:owner_id => '7505382', :slug => 'presidents'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
732
732
  end
733
733
  it 'requests the correct resource' do
734
734
  @client.list('presidents')
735
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
735
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
736
736
  expect(a_get('/1.1/lists/show.json').with(:query => {:owner_id => '7505382', :slug => 'presidents'})).to have_been_made
737
737
  end
738
738
  end
@@ -804,12 +804,12 @@ describe Twitter::REST::Lists do
804
804
  end
805
805
  context 'without a screen name passed' do
806
806
  before do
807
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
807
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
808
808
  stub_get('/1.1/lists/subscriptions.json').with(:query => {:user_id => '7505382', :cursor => '-1'}).to_return(:body => fixture('subscriptions.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
809
809
  end
810
810
  it 'requests the correct resource' do
811
811
  @client.subscriptions
812
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
812
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
813
813
  expect(a_get('/1.1/lists/subscriptions.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
814
814
  end
815
815
  context 'with each' do
@@ -818,7 +818,7 @@ describe Twitter::REST::Lists do
818
818
  end
819
819
  it 'requests the correct resource' do
820
820
  @client.subscriptions.each {}
821
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
821
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
822
822
  expect(a_get('/1.1/lists/subscriptions.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
823
823
  expect(a_get('/1.1/lists/subscriptions.json').with(:query => {:user_id => '7505382', :cursor => '1401037770457540712'})).to have_been_made
824
824
  end
@@ -861,12 +861,12 @@ describe Twitter::REST::Lists do
861
861
  end
862
862
  context 'without a screen name passed' do
863
863
  before do
864
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
864
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
865
865
  stub_post('/1.1/lists/members/destroy_all.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286,18755393'}).to_return(:body => fixture('list.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
866
866
  end
867
867
  it 'requests the correct resource' do
868
868
  @client.remove_list_members('presidents', [813_286, 18_755_393])
869
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
869
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
870
870
  expect(a_post('/1.1/lists/members/destroy_all.json').with(:body => {:owner_id => '7505382', :slug => 'presidents', :user_id => '813286,18755393'})).to have_been_made
871
871
  end
872
872
  end
@@ -890,12 +890,12 @@ describe Twitter::REST::Lists do
890
890
  end
891
891
  context 'without a screen name passed' do
892
892
  before do
893
- stub_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
893
+ stub_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'}).to_return(:body => fixture('sferik.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
894
894
  stub_get('/1.1/lists/ownerships.json').with(:query => {:user_id => '7505382', :cursor => '-1'}).to_return(:body => fixture('ownerships.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
895
895
  end
896
896
  it 'requests the correct resource' do
897
897
  @client.owned_lists
898
- expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:include_entities => 'false', :skip_status => 'true'})).to have_been_made
898
+ expect(a_get('/1.1/account/verify_credentials.json').with(:query => {:skip_status => 'true'})).to have_been_made
899
899
  expect(a_get('/1.1/lists/ownerships.json').with(:query => {:user_id => '7505382', :cursor => '-1'})).to have_been_made
900
900
  end
901
901
  it 'returns the requested list' do