Skip to content

Instantly share code, notes, and snippets.

@norcali
Created June 3, 2013 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norcali/5698858 to your computer and use it in GitHub Desktop.
Save norcali/5698858 to your computer and use it in GitHub Desktop.
describe "#statuses" do
it "returns an array of Tweets" do
statuses = Twitter::SearchResults.new(:statuses => [{:id => 25938088801, :text => 'tweet!'}]).statuses
expect(statuses).to be_an Array
expect(statuses.first).to be_a Twitter::Tweet
end
it "returns an array of Tweets" do
statuses = Twitter.search("Twitter").statuses
expect(statuses).to be_an Array
expect(statuses.first).to be_a Twitter::Tweet
end
end
describe "#next_results" do
tw = Twitter.search("Twitter")
results = Twitter::SearchResults.new(:statuses => [{:id => 25938088801, :text => 'tweet!'}])
it "returns a hash of query parameters" do
expect(results.next_results).to be_a Hash
end
it "returns a hash of query parameter" do
expect(tw.next_results).to be_a Hash
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment