diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 5da1b6b..05a328c 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -163,6 +163,14 @@ Then /^(?:|I )should not see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, se end end +Then /^(?:|I )should not see "([^"]*)" within any "([^"]*)"?$/ do |text, selector| + if page.respond_to? :should + page.should have_no_css(selector, :text => text) + else + assert page.has_no_css?(selector, :text => text) + end +end + Then /^the "([^"]*)" field(?: within "([^"]*)")? should contain "([^"]*)"$/ do |field, selector, value| with_scope(selector) do field = find_field(field) -- libgit2 0.21.2