def should_be_on_page(page_name_or_path)
      # Use the path_to translator function if it's defined
      # (normally in features/support/paths.rb)
      if defined? path_to
        expect_path = path_to(page_name_or_path)
      # Otherwise, expect a raw path string
      else
        expect_path = page_name_or_path
      end
      actual_path = URI.parse(current_url).path
      if actual_path != expect_path
        raise Kelp::Unexpected,
          "Expected to be on page: '#{expect_path}'" + \
          "\nActually on page: '#{actual_path}'"
      end
    end
def should_be_on_page(page_name_or_path)
      # Use the path_to translator function if it's defined
      # (normally in features/support/paths.rb)
      if defined? path_to
        expect_path = path_to(page_name_or_path)
      # Otherwise, expect a raw path string
      else
        expect_path = page_name_or_path
      end
      actual_path = URI.parse(current_url).path
      if actual_path != expect_path
        raise Kelp::Unexpected,
          "Expected to be on page: '#{expect_path}'" + \
          "\nActually on page: '#{actual_path}'"
      end
    end
Verify that the current page matches the path of `page_name_or_path`. The
 cucumber-generated `path_to` function will be used, if it's defined, to
 translate human-readable names into URL paths. Otherwise, assume a raw,
 absolute path string.

 @example
   should_be_on_page 'home page'
   should_be_on_page '/admin/login'

 @param [String] page_name_or_path
   Human-readable page name (mapped to a pathname by your `path_to` function),
   or an absolute path beginning with `/`.

 @raise [Kelp::Unexpected]
   If actual page path doesn't match the expected path

 @since 0.1.9