to move to the next iteration use continue in js.
ensure the page has been reloaded before testing current_path

This test would fail sometimes on
  assert_equal '/', current_path

I believe it was a timing issue. page.has_content? will wait for the content to show up. So afterwards the current_path should always be correct.