From 24ece551f92e367ff4c4219727bf7ad190d442b2 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Mon, 4 Jul 2011 16:04:59 -0700 Subject: [PATCH] Do one step def in capybara rather than JS --- features/step_definitions/custom_web_steps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 135776487..c61534ed3 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -174,7 +174,7 @@ Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)" end Then /^I should see (\d+) posts$/ do |n_posts| - evaluate_script("$('#main_stream .stream_element').length").should == n_posts.to_i + all("#main_stream .stream_element").length.should == n_posts.to_i end And /^I scroll down$/ do