Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change #user_stream to #userstream for better look

  • Loading branch information...
commit 79311f5043ac1efc5775d28e12c1fa4343394fde 1 parent 2a5e170
@coreyhaines coreyhaines authored
Showing with 6 additions and 6 deletions.
  1. +1 −1  lib/tweetstream/client.rb
  2. +5 −5 spec/tweetstream/client_spec.rb
View
2  lib/tweetstream/client.rb
@@ -127,7 +127,7 @@ def filter(query_params = {}, &block)
# to follow the tweets of specified users or track keywords. This
# method is provided separately for cases when it would conserve the
# number of HTTP connections to combine track and follow.
- def user_stream(&block)
+ def userstream(&block)
start('', :extra_stream_parameters => {:host => "userstream.twitter.com", :path => "/2/user.json"}, &block)
end
View
10 spec/tweetstream/client_spec.rb
@@ -159,7 +159,7 @@
yielded_dm = nil
@client.on_direct_message do |dm|
yielded_dm = dm
- end.user_stream
+ end.userstream
yielded_dm.should_not be_nil
yielded_dm.id.should == 1234
yielded_dm.user.screen_name.should == "coder"
@@ -170,7 +170,7 @@
yielded_client = nil
@client.on_direct_message do |_, client|
yielded_client = client
- end.user_stream
+ end.userstream
yielded_client.should == @client
end
end
@@ -340,15 +340,15 @@
@client.track('monday')
end
- context "when calling #user_stream" do
+ context "when calling #userstream" do
it "sends the userstream host" do
Twitter::JSONStream.should_receive(:connect).with(hash_including(:host => "userstream.twitter.com")).and_return(@stream)
- @client.user_stream
+ @client.userstream
end
it "uses the userstream uri" do
Twitter::JSONStream.should_receive(:connect).with(hash_including(:path => "/2/user.json")).and_return(@stream)
- @client.user_stream
+ @client.userstream
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.