diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index fd1994a..3274cef 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -11,8 +11,14 @@ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "pat module WithinHelpers def with_scope(locator) - locator = locator ? first(locator) : locator - locator ? within(locator) { yield } : yield + if locator + locator = first(locator) || locator + within(locator) do + yield + end + else + yield + end end end World(WithinHelpers) -- libgit2 0.21.2