class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation
def add_ignore_query_options(corrector, node)
This ensures the option `ignore_query: true` is added
while `page.current_path` does not.
`have_current_path` with no options will include the querystring
def add_ignore_query_options(corrector, node) expectation_node = node.parent.last_argument expectation_last_child = expectation_node.children.last return if %i[regexp str].include?(expectation_last_child.type) corrector.insert_after( expectation_last_child, ', ignore_query: true' ) end