diff --git a/features/signs_up.feature b/features/signs_up.feature index 2b5b87e2f..450c14c81 100644 --- a/features/signs_up.feature +++ b/features/signs_up.feature @@ -8,9 +8,7 @@ Feature: new user registration And I fill in "user_password" with "secret" And I press "Continue" Then I should be on the getting started page - And I should see "Well, hello there!" - And I should see "Who are you?" - And I should see "What are you into?" + And I should see "Well, hello there!" and "Who are you?" and "What are you into?" Scenario: new user goes through the setup wizard When I fill in the following: diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index ba4943384..62fcebb62 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -105,12 +105,14 @@ Then /^(?:|I )should see JSON:$/ do |expected_json| expected.should == actual end -Then /^(?:|I )should see "([^"]*)"(?: within "([^"]*)")?$/ do |text, selector| - with_scope(selector) do - if page.respond_to? :should - page.should have_content(text) - else - assert page.has_content?(text) +Then /^(?:|I )should see (\".+?\"[\s]*)(?:[\s]+within[\s]* "([^"]*)")?$/ do |vars,selector| + vars.scan(/"([^"]+?)"/).flatten.each do |text| + with_scope(selector) do + if page.respond_to? :should + page.should have_content(text) + else + assert page.has_content?(text) + end end end end @@ -126,12 +128,14 @@ Then /^(?:|I )should see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, select end end -Then /^(?:|I )should not see "([^"]*)"(?: within "([^"]*)")?$/ do |text, selector| - with_scope(selector) do - if page.respond_to? :should - page.should have_no_content(text) - else - assert page.has_no_content?(text) +Then /^(?:|I )should not see (\".+?\"[\s]*)(?:[\s]+within[\s]* "([^"]*)")?$/ do |vars,selector| + vars.scan(/"([^"]+?)"/).flatten.each do |text| + with_scope(selector) do + if page.respond_to? :should + page.should have_no_content(text) + else + assert page.has_no_content?(text) + end end end end