Skip to content

Commit

Permalink
Update specs
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jun 30, 2012
1 parent 417d79e commit 5e1d765
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 42 deletions.
40 changes: 20 additions & 20 deletions spec/cli_spec.rb
Expand Up @@ -43,7 +43,7 @@

describe "#authorize" do
before do
@cli.options = @cli.options.merge("profile" => project_path + "/tmp/trc", "display-url" => true)
@cli.options = @cli.options.merge("profile" => project_path + "/tmp/authorize", "display-url" => true)
stub_post("/oauth/request_token").
to_return(:body => fixture("request_token"))
stub_post("/oauth/access_token").
Expand Down Expand Up @@ -529,7 +529,7 @@
$stdout.string.should == <<-eos
ID,Since,Last tweeted at,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
14100886,2008-03-08 16:34:22 +0000,2010-10-21 10:33:15 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
7505382,2007-07-16 12:59:01 +0000,,2962,727,29,88,898,sferik,Erik Michaels-Ober
7505382,2007-07-16 12:59:01 +0000,2011-01-16 21:38:25 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
eos
end
end
Expand Down Expand Up @@ -578,7 +578,7 @@
$stdout.string.should == <<-eos
ID Since Last tweeted at Tweets Favorites Listed Following...
14100886 Mar 8 2008 Oct 21 2010 3913 32 185 1871...
7505382 Jul 16 2007 2962 727 29 88...
7505382 Jul 16 2007 Jan 16 2011 2962 727 29 88...
eos
end
end
Expand Down Expand Up @@ -615,7 +615,7 @@
end
it "should sort by the time of the last Tweet" do
@cli.groupies
$stdout.string.chomp.should == "sferik pengwynn"
$stdout.string.chomp.should == "pengwynn sferik"
end
end
context "--unsorted" do
Expand Down Expand Up @@ -1260,7 +1260,7 @@
$stdout.string.should == <<-eos
ID,Since,Last tweeted at,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
14100886,2008-03-08 16:34:22 +0000,2010-10-21 10:33:15 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
7505382,2007-07-16 12:59:01 +0000,,2962,727,29,88,898,sferik,Erik Michaels-Ober
7505382,2007-07-16 12:59:01 +0000,2011-01-16 21:38:25 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
eos
end
end
Expand Down Expand Up @@ -1309,7 +1309,7 @@
$stdout.string.should == <<-eos
ID Since Last tweeted at Tweets Favorites Listed Following...
14100886 Mar 8 2008 Oct 21 2010 3913 32 185 1871...
7505382 Jul 16 2007 2962 727 29 88...
7505382 Jul 16 2007 Jan 16 2011 2962 727 29 88...
eos
end
end
Expand Down Expand Up @@ -1346,7 +1346,7 @@
end
it "should sort by the time of the last Tweet" do
@cli.followings
$stdout.string.chomp.should == "sferik pengwynn"
$stdout.string.chomp.should == "pengwynn sferik"
end
end
context "--unsorted" do
Expand Down Expand Up @@ -1424,7 +1424,7 @@
$stdout.string.should == <<-eos
ID,Since,Last tweeted at,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
14100886,2008-03-08 16:34:22 +0000,2010-10-21 10:33:15 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
7505382,2007-07-16 12:59:01 +0000,,2962,727,29,88,898,sferik,Erik Michaels-Ober
7505382,2007-07-16 12:59:01 +0000,2011-01-16 21:38:25 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
eos
end
end
Expand Down Expand Up @@ -1473,7 +1473,7 @@
$stdout.string.should == <<-eos
ID Since Last tweeted at Tweets Favorites Listed Following...
14100886 Mar 8 2008 Oct 21 2010 3913 32 185 1871...
7505382 Jul 16 2007 2962 727 29 88...
7505382 Jul 16 2007 Jan 16 2011 2962 727 29 88...
eos
end
end
Expand Down Expand Up @@ -1510,7 +1510,7 @@
end
it "should sort by the time of the last Tweet" do
@cli.followers
$stdout.string.chomp.should == "sferik pengwynn"
$stdout.string.chomp.should == "pengwynn sferik"
end
end
context "--unsorted" do
Expand Down Expand Up @@ -1597,7 +1597,7 @@
$stdout.string.should == <<-eos
ID,Since,Last tweeted at,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
14100886,2008-03-08 16:34:22 +0000,2010-10-21 10:33:15 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
7505382,2007-07-16 12:59:01 +0000,,2962,727,29,88,898,sferik,Erik Michaels-Ober
7505382,2007-07-16 12:59:01 +0000,2011-01-16 21:38:25 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
eos
end
end
Expand Down Expand Up @@ -1646,7 +1646,7 @@
$stdout.string.should == <<-eos
ID Since Last tweeted at Tweets Favorites Listed Following...
14100886 Mar 8 2008 Oct 21 2010 3913 32 185 1871...
7505382 Jul 16 2007 2962 727 29 88...
7505382 Jul 16 2007 Jan 16 2011 2962 727 29 88...
eos
end
end
Expand Down Expand Up @@ -1683,7 +1683,7 @@
end
it "should sort by the time of the last Tweet" do
@cli.friends
$stdout.string.chomp.should == "sferik pengwynn"
$stdout.string.chomp.should == "pengwynn sferik"
end
end
context "--unsorted" do
Expand Down Expand Up @@ -1779,7 +1779,7 @@
$stdout.string.should == <<-eos
ID,Since,Last tweeted at,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
14100886,2008-03-08 16:34:22 +0000,2010-10-21 10:33:15 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
7505382,2007-07-16 12:59:01 +0000,,2962,727,29,88,898,sferik,Erik Michaels-Ober
7505382,2007-07-16 12:59:01 +0000,2011-01-16 21:38:25 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
eos
end
end
Expand Down Expand Up @@ -1828,8 +1828,8 @@
$stdout.string.should == <<-eos
ID Since Last tweeted at Tweets Favorites Listed Following...
14100886 Mar 8 2008 Oct 21 2010 3913 32 185 1871...
7505382 Jul 16 2007 2962 727 29 88...
eos
7505382 Jul 16 2007 Jan 16 2011 2962 727 29 88...
eos
end
end
context "--posted" do
Expand Down Expand Up @@ -1865,7 +1865,7 @@
end
it "should sort by the time of the last Tweet" do
@cli.leaders
$stdout.string.chomp.should == "sferik pengwynn"
$stdout.string.chomp.should == "pengwynn sferik"
end
end
context "--unsorted" do
Expand Down Expand Up @@ -3528,7 +3528,7 @@
$stdout.string.should == <<-eos
ID,Since,Last tweeted at,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
14100886,2008-03-08 16:34:22 +0000,2010-10-21 10:33:15 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
7505382,2007-07-16 12:59:01 +0000,,2962,727,29,88,898,sferik,Erik Michaels-Ober
7505382,2007-07-16 12:59:01 +0000,2011-01-16 21:38:25 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
eos
end
end
Expand Down Expand Up @@ -3591,7 +3591,7 @@
$stdout.string.should == <<-eos
ID Since Last tweeted at Tweets Favorites Listed Following...
14100886 Mar 8 2008 Oct 21 2010 3913 32 185 1871...
7505382 Jul 16 2007 2962 727 29 88...
7505382 Jul 16 2007 Jan 16 2011 2962 727 29 88...
eos
end
end
Expand Down Expand Up @@ -3628,7 +3628,7 @@
end
it "should sort by the time of the last Tweet" do
@cli.users("sferik", "pengwynn")
$stdout.string.chomp.should == "sferik pengwynn"
$stdout.string.chomp.should == "pengwynn sferik"
end
end
context "--unsorted" do
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/status_no_attributes.json
@@ -1,7 +1,7 @@
{
"created_at": "Wed Apr 06 19:13:37 +0000 2011",
"id": 55709764298092546,
"id_str": "55709764298092545",
"id_str": "55709764298092546",
"text": "The problem with your code is that it's doing exactly what you told it to do.",
"source": "<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"truncated": false,
Expand Down Expand Up @@ -101,4 +101,4 @@
"favorited": false,
"retweeted": false,
"possibly_sensitive": false
}
}
4 changes: 2 additions & 2 deletions spec/fixtures/status_no_country.json
@@ -1,7 +1,7 @@
{
"created_at": "Wed Apr 06 19:13:37 +0000 2011",
"id": 55709764298092547,
"id_str": "55709764298092545",
"id_str": "55709764298092547",
"text": "The problem with your code is that it's doing exactly what you told it to do.",
"source": "<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"truncated": false,
Expand Down Expand Up @@ -99,4 +99,4 @@
"favorited": false,
"retweeted": false,
"possibly_sensitive": false
}
}
4 changes: 2 additions & 2 deletions spec/fixtures/status_no_full_name.json
@@ -1,7 +1,7 @@
{
"created_at": "Wed Apr 06 19:13:37 +0000 2011",
"id": 55709764298092548,
"id_str": "55709764298092545",
"id_str": "55709764298092548",
"text": "The problem with your code is that it's doing exactly what you told it to do.",
"source": "<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"truncated": false,
Expand Down Expand Up @@ -98,4 +98,4 @@
"favorited": false,
"retweeted": false,
"possibly_sensitive": false
}
}
4 changes: 2 additions & 2 deletions spec/fixtures/status_no_locality.json
@@ -1,7 +1,7 @@
{
"created_at": "Wed Apr 06 19:13:37 +0000 2011",
"id": 55709764298092549,
"id_str": "55709764298092545",
"id_str": "55709764298092549",
"text": "The problem with your code is that it's doing exactly what you told it to do.",
"source": "<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"truncated": false,
Expand Down Expand Up @@ -104,4 +104,4 @@
"favorited": false,
"retweeted": false,
"possibly_sensitive": false
}
}
4 changes: 2 additions & 2 deletions spec/fixtures/status_no_street_address.json
@@ -1,7 +1,7 @@
{
"created_at": "Wed Apr 06 19:13:37 +0000 2011",
"id": 55709764298092550,
"id_str": "55709764298092545",
"id_str": "55709764298092550",
"text": "The problem with your code is that it's doing exactly what you told it to do.",
"source": "<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"truncated": false,
Expand Down Expand Up @@ -105,4 +105,4 @@
"favorited": false,
"retweeted": false,
"possibly_sensitive": false
}
}
12 changes: 6 additions & 6 deletions spec/format_helpers_spec.rb
Expand Up @@ -6,19 +6,19 @@
before :all do
Timecop.freeze(Time.utc(2011, 11, 24, 16, 20, 0))
T.utc_offset = 'PST'
class Test; end
end

before :each do
@test = Test.new
@test.extend(T::FormatHelpers)
end

after :all do
T.utc_offset = nil
Timecop.return
end

before do
class Test; end
@test = Test.new
@test.extend(T::FormatHelpers)
end

describe "#distance_of_time_in_words" do
it "returns \"a split second\" if difference is less than a second" do
@test.send(:distance_of_time_in_words, (Time.utc(2011, 11, 24, 16, 20, 0))).should == "a split second"
Expand Down
6 changes: 3 additions & 3 deletions spec/list_spec.rb
Expand Up @@ -188,7 +188,7 @@
$stdout.string.should == <<-eos
ID,Since,Last tweeted at,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
14100886,2008-03-08 16:34:22 +0000,2010-10-21 10:33:15 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
7505382,2007-07-16 12:59:01 +0000,,2962,727,29,88,898,sferik,Erik Michaels-Ober
7505382,2007-07-16 12:59:01 +0000,2011-01-16 21:38:25 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
eos
end
end
Expand Down Expand Up @@ -237,7 +237,7 @@
$stdout.string.should == <<-eos
ID Since Last tweeted at Tweets Favorites Listed Following...
14100886 Mar 8 2008 Oct 21 2010 3913 32 185 1871...
7505382 Jul 16 2007 2962 727 29 88...
7505382 Jul 16 2007 Jan 16 2011 2962 727 29 88...
eos
end
end
Expand Down Expand Up @@ -274,7 +274,7 @@
end
it "should sort by the time of the last Tweet" do
@list.members("presidents")
$stdout.string.chomp.should == "sferik pengwynn"
$stdout.string.chomp.should == "pengwynn sferik"
end
end
context "--unsorted" do
Expand Down
6 changes: 3 additions & 3 deletions spec/search_spec.rb
Expand Up @@ -703,7 +703,7 @@
$stdout.string.should == <<-eos
ID,Since,Last tweeted at,Tweets,Favorites,Listed,Following,Followers,Screen name,Name
14100886,2008-03-08 16:34:22 +0000,2010-10-21 10:33:15 +0000,3913,32,185,1871,2767,pengwynn,Wynn Netherland
7505382,2007-07-16 12:59:01 +0000,,2962,727,29,88,898,sferik,Erik Michaels-Ober
7505382,2007-07-16 12:59:01 +0000,2011-01-16 21:38:25 +0000,2962,727,29,88,898,sferik,Erik Michaels-Ober
eos
end
end
Expand Down Expand Up @@ -752,7 +752,7 @@
$stdout.string.should == <<-eos
ID Since Last tweeted at Tweets Favorites Listed Following...
14100886 Mar 8 2008 Oct 21 2010 3913 32 185 1871...
7505382 Jul 16 2007 2962 727 29 88...
7505382 Jul 16 2007 Jan 16 2011 2962 727 29 88...
eos
end
end
Expand Down Expand Up @@ -789,7 +789,7 @@
end
it "should sort by the time of the last Tweet" do
@search.users("Erik")
$stdout.string.chomp.should == "sferik pengwynn"
$stdout.string.chomp.should == "pengwynn sferik"
end
end
context "--unsorted" do
Expand Down

0 comments on commit 5e1d765

Please sign in to comment.