Permalink
Browse files

Improve specs for list

  • Loading branch information...
1 parent 690116b commit 1b6e5a48a22ae786a7f93c9a44a10872bd65251e @sferik committed Dec 20, 2012
@@ -524,7 +524,7 @@ def list_from_response(request_method, path, args)
def lists_from_response(request_method, path, args)
options = extract_options!(args)
merge_default_cursor!(options)
- merge_user!(options, args.pop)
+ merge_user!(options, args.pop || screen_name) unless options[:user_id] || options[:screen_name]
cursor_from_response(:lists, Twitter::List, request_method, path, options, calling_method)
end
Oops, something went wrong.
@@ -1 +1 @@
-{"lists":[{"uri":"\/pengwynn\/rubyists","name":"Rubyists","full_name":"@pengwynn\/rubyists","description":"","mode":"public","user":{"id":14100886,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","time_zone":"Central Time (US & Canada)","location":"Denton, TX","profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","id_str":"14100886","entities":{"url":{"urls":[{"url":"http:\/\/wynnnetherland.com","display_url":null,"indices":[0,25],"expanded_url":null}]},"description":{"urls":[]}},"profile_link_color":"0084B4","geo_enabled":true,"default_profile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/2221455972\/wynn-mic-bw_normal.jpg","utc_offset":-21600,"profile_use_background_image":false,"statuses_count":7384,"name":"Wynn Netherland","follow_request_sent":false,"profile_text_color":"333333","lang":"en","screen_name":"pengwynn","listed_count":397,"protected":false,"is_translator":false,"followers_count":6182,"profile_sidebar_border_color":"FFFFFF","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/2221455972\/wynn-mic-bw_normal.jpg","description":"Christian, husband, father, GitHubber, Co-host of @thechangelog, Co-author of Sass, Compass, #CSS book http:\/\/wynn.fm\/sass-meap","profile_background_tile":false,"following":true,"profile_sidebar_fill_color":"DDEEF6","default_profile_image":false,"url":"http:\/\/wynnnetherland.com","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/14100886\/1347987369","favourites_count":338,"created_at":"Sat Mar 08 16:34:22 +0000 2008","friends_count":3528,"verified":false,"notifications":false,"profile_background_color":"292929","contributors_enabled":false},"following":true,"created_at":"Fri Oct 30 14:39:25 +0000 2009","member_count":499,"id_str":"1129440","subscriber_count":39,"slug":"rubyists","id":1129440},{"uri":"\/twitter\/team","name":"Team","full_name":"@twitter\/team","description":"","mode":"public","user":{"id":783214,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/657090062\/l1uqey5sy82r9ijhke1i.png","time_zone":"Pacific Time (US & Canada)","location":"San Francisco, CA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/657090062\/l1uqey5sy82r9ijhke1i.png","id_str":"783214","entities":{"url":{"urls":[{"url":"http:\/\/blog.twitter.com\/","display_url":null,"indices":[0,24],"expanded_url":null}]},"description":{"urls":[]}},"profile_link_color":"038543","geo_enabled":true,"default_profile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/2284174758\/v65oai7fxn47qv9nectx_normal.png","utc_offset":-28800,"profile_use_background_image":true,"statuses_count":1433,"name":"Twitter","follow_request_sent":false,"profile_text_color":"333333","lang":"en","screen_name":"twitter","listed_count":73289,"protected":false,"is_translator":false,"followers_count":13711744,"profile_sidebar_border_color":"EEEEEE","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/2284174758\/v65oai7fxn47qv9nectx_normal.png","description":"Always wondering what's happening. ","profile_background_tile":true,"following":true,"profile_sidebar_fill_color":"F6F6F6","default_profile_image":false,"url":"http:\/\/blog.twitter.com\/","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/783214\/1347405327","favourites_count":18,"created_at":"Tue Feb 20 14:35:54 +0000 2007","friends_count":1249,"verified":true,"notifications":false,"profile_background_color":"ACDED6","contributors_enabled":true},"following":true,"created_at":"Wed Sep 23 01:18:01 +0000 2009","member_count":1199,"id_str":"574","subscriber_count":78079,"slug":"team","id":574}], "next_cursor":0, "previous_cursor":0, "next_cursor_str":"0", "previous_cursor_str":"0"}
+{"lists":[{"uri":"\/pengwynn\/rubyists","name":"Rubyists","full_name":"@pengwynn\/rubyists","description":"","mode":"public","user":{"id":14100886,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","time_zone":"Central Time (US & Canada)","location":"Denton, TX","profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","id_str":"14100886","entities":{"url":{"urls":[{"url":"http:\/\/wynnnetherland.com","display_url":null,"indices":[0,25],"expanded_url":null}]},"description":{"urls":[]}},"profile_link_color":"0084B4","geo_enabled":true,"default_profile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/2221455972\/wynn-mic-bw_normal.jpg","utc_offset":-21600,"profile_use_background_image":false,"statuses_count":7384,"name":"Wynn Netherland","follow_request_sent":false,"profile_text_color":"333333","lang":"en","screen_name":"pengwynn","listed_count":397,"protected":false,"is_translator":false,"followers_count":6182,"profile_sidebar_border_color":"FFFFFF","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/2221455972\/wynn-mic-bw_normal.jpg","description":"Christian, husband, father, GitHubber, Co-host of @thechangelog, Co-author of Sass, Compass, #CSS book http:\/\/wynn.fm\/sass-meap","profile_background_tile":false,"following":true,"profile_sidebar_fill_color":"DDEEF6","default_profile_image":false,"url":"http:\/\/wynnnetherland.com","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/14100886\/1347987369","favourites_count":338,"created_at":"Sat Mar 08 16:34:22 +0000 2008","friends_count":3528,"verified":false,"notifications":false,"profile_background_color":"292929","contributors_enabled":false},"following":true,"created_at":"Fri Oct 30 14:39:25 +0000 2009","member_count":499,"id_str":"1129440","subscriber_count":39,"slug":"rubyists","id":1129440},{"uri":"\/twitter\/team","name":"Team","full_name":"@twitter\/team","description":"","mode":"public","user":{"id":783214,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/657090062\/l1uqey5sy82r9ijhke1i.png","time_zone":"Pacific Time (US & Canada)","location":"San Francisco, CA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/657090062\/l1uqey5sy82r9ijhke1i.png","id_str":"783214","entities":{"url":{"urls":[{"url":"http:\/\/blog.twitter.com\/","display_url":null,"indices":[0,24],"expanded_url":null}]},"description":{"urls":[]}},"profile_link_color":"038543","geo_enabled":true,"default_profile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/2284174758\/v65oai7fxn47qv9nectx_normal.png","utc_offset":-28800,"profile_use_background_image":true,"statuses_count":1433,"name":"Twitter","follow_request_sent":false,"profile_text_color":"333333","lang":"en","screen_name":"twitter","listed_count":73289,"protected":false,"is_translator":false,"followers_count":13711744,"profile_sidebar_border_color":"EEEEEE","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/2284174758\/v65oai7fxn47qv9nectx_normal.png","description":"Always wondering what's happening. ","profile_background_tile":true,"following":true,"profile_sidebar_fill_color":"F6F6F6","default_profile_image":false,"url":"http:\/\/blog.twitter.com\/","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/783214\/1347405327","favourites_count":18,"created_at":"Tue Feb 20 14:35:54 +0000 2007","friends_count":1249,"verified":true,"notifications":false,"profile_background_color":"ACDED6","contributors_enabled":true},"following":true,"created_at":"Wed Sep 23 01:18:01 +0000 2009","member_count":1199,"id_str":"574","subscriber_count":78079,"slug":"team","id":574}], "next_cursor":1401037770457540712, "previous_cursor":0, "next_cursor_str":"1401037770457540712", "previous_cursor_str":"0"}
@@ -0,0 +1 @@
+{"lists":[{"uri":"\/pengwynn\/rubyists","name":"Rubyists","full_name":"@pengwynn\/rubyists","description":"","mode":"public","user":{"id":14100886,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","time_zone":"Central Time (US & Canada)","location":"Denton, TX","profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","id_str":"14100886","entities":{"url":{"urls":[{"url":"http:\/\/wynnnetherland.com","display_url":null,"indices":[0,25],"expanded_url":null}]},"description":{"urls":[]}},"profile_link_color":"0084B4","geo_enabled":true,"default_profile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/2221455972\/wynn-mic-bw_normal.jpg","utc_offset":-21600,"profile_use_background_image":false,"statuses_count":7384,"name":"Wynn Netherland","follow_request_sent":false,"profile_text_color":"333333","lang":"en","screen_name":"pengwynn","listed_count":397,"protected":false,"is_translator":false,"followers_count":6182,"profile_sidebar_border_color":"FFFFFF","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/2221455972\/wynn-mic-bw_normal.jpg","description":"Christian, husband, father, GitHubber, Co-host of @thechangelog, Co-author of Sass, Compass, #CSS book http:\/\/wynn.fm\/sass-meap","profile_background_tile":false,"following":true,"profile_sidebar_fill_color":"DDEEF6","default_profile_image":false,"url":"http:\/\/wynnnetherland.com","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/14100886\/1347987369","favourites_count":338,"created_at":"Sat Mar 08 16:34:22 +0000 2008","friends_count":3528,"verified":false,"notifications":false,"profile_background_color":"292929","contributors_enabled":false},"following":true,"created_at":"Fri Oct 30 14:39:25 +0000 2009","member_count":499,"id_str":"1129440","subscriber_count":39,"slug":"rubyists","id":1129440},{"uri":"\/twitter\/team","name":"Team","full_name":"@twitter\/team","description":"","mode":"public","user":{"id":783214,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/657090062\/l1uqey5sy82r9ijhke1i.png","time_zone":"Pacific Time (US & Canada)","location":"San Francisco, CA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/657090062\/l1uqey5sy82r9ijhke1i.png","id_str":"783214","entities":{"url":{"urls":[{"url":"http:\/\/blog.twitter.com\/","display_url":null,"indices":[0,24],"expanded_url":null}]},"description":{"urls":[]}},"profile_link_color":"038543","geo_enabled":true,"default_profile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/2284174758\/v65oai7fxn47qv9nectx_normal.png","utc_offset":-28800,"profile_use_background_image":true,"statuses_count":1433,"name":"Twitter","follow_request_sent":false,"profile_text_color":"333333","lang":"en","screen_name":"twitter","listed_count":73289,"protected":false,"is_translator":false,"followers_count":13711744,"profile_sidebar_border_color":"EEEEEE","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/2284174758\/v65oai7fxn47qv9nectx_normal.png","description":"Always wondering what's happening. ","profile_background_tile":true,"following":true,"profile_sidebar_fill_color":"F6F6F6","default_profile_image":false,"url":"http:\/\/blog.twitter.com\/","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/783214\/1347405327","favourites_count":18,"created_at":"Tue Feb 20 14:35:54 +0000 2007","friends_count":1249,"verified":true,"notifications":false,"profile_background_color":"ACDED6","contributors_enabled":true},"following":true,"created_at":"Wed Sep 23 01:18:01 +0000 2009","member_count":1199,"id_str":"574","subscriber_count":78079,"slug":"team","id":574}], "next_cursor":0, "previous_cursor":1401037770457540712, "next_cursor_str":"0", "previous_cursor_str":"1401037770457540712"}
Oops, something went wrong.

0 comments on commit 1b6e5a4

Please sign in to comment.