diff --git a/lib/twitter/search.rb b/lib/twitter/search.rb index 33a4e7c95..fa50b0b79 100644 --- a/lib/twitter/search.rb +++ b/lib/twitter/search.rb @@ -42,6 +42,7 @@ def clear @cache = nil @query = {} @query[:q] = [] + @query[:tude] = [] self end @@ -133,7 +134,7 @@ def until_date(date) # @example Return an array of tweets containing happy emoticons # Twitter::Search.new.positive.fetch def positive - @query[:q] << ":)" + @query[:tude] << ":)" self end @@ -143,7 +144,7 @@ def positive # @example Return an array of tweets containing sad emoticons # Twitter::Search.new.negative.fetch def negative - @query[:q] << ":(" + @query[:tude] << ":(" self end @@ -153,7 +154,7 @@ def negative # @example Return an array of tweets containing question marks # Twitter::Search.new.question.fetch def question - @query[:q] << "?" + @query[:tude] << "?" self end diff --git a/spec/twitter/search_spec.rb b/spec/twitter/search_spec.rb index cc17438ea..f2de221b4 100644 --- a/spec/twitter/search_spec.rb +++ b/spec/twitter/search_spec.rb @@ -261,7 +261,7 @@ describe ".positive" do it "should set the query to include ':)'" do - @client.positive.query[:q].should include ':)' + @client.positive.query[:tude].should include ':)' end end @@ -269,7 +269,7 @@ describe ".negative" do it "should set the query to include ':('" do - @client.negative.query[:q].should include ':(' + @client.negative.query[:tude].should include ':(' end end @@ -277,7 +277,7 @@ describe ".question" do it "should set the query to include '?'" do - @client.question.query[:q].should include '?' + @client.question.query[:tude].should include '?' end end