Skip to content

Instantly share code, notes, and snippets.

@kornysietsma
Created November 2, 2009 09:15
Show Gist options
  • Save kornysietsma/224045 to your computer and use it in GitHub Desktop.
Save kornysietsma/224045 to your computer and use it in GitHub Desktop.
Given "I am on the Twitter home page" do
@home_page.visit
end
Given "I see the most popular topic" do
@most_popular = @home_page.most_popular_topic
puts "Most popular topic: '#{@most_popular}'"
end
When "I visit the Twitter home page" do
Given "I am on the Twitter home page"
end
When "I search for the most popular topic" do
@home_page.search(@most_popular)
end
Then "I should be able to see popular topics right now" do
@home_page.should have_popular_topics
end
Then "I should see results containing the most popular topic" do
@results_page.tweets.each {|result| result[:tweet].downcase.should include @most_popular.downcase}
end
Then /^I should see a message indicating more results exist within (\d+) seconds$/ do |timeout|
@results_page.wait_for_more_results(timeout.to_i)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment