lib/chop/dsl.rb in chop-0.29.0 vs lib/chop/dsl.rb in chop-0.30.0

- old
+ new

@@ -6,19 +6,19 @@ def create! klass, table, &block Create.create! klass, table, &block end - def diff! selector, table, session: Capybara.current_session, as: nil, timeout: nil, &block + def diff! selector, table, session: Capybara.current_session, as: nil, timeout: nil, **kwargs, &block class_name = if as as.to_s elsif selector.respond_to?(:tag_name) selector.tag_name else session.find(selector).tag_name end.camelize klass = const_get("Chop::#{class_name}") - kwargs = { session: session } + kwargs[:session] = session kwargs[:timeout] = timeout if timeout.present? klass.diff! selector, table, **kwargs, &block end def fill_in! table