You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cursor_test.rb
    path of file: ./repos/occams-record/test
    
    the code of the file until where you have to start completion: require 'test_helper'

class CursorTest < Minitest::Test
  include TestHelpers

  def setup
    DatabaseCleaner.start
    Time.zone = "Eastern Time (US & Canada)"
    skip "No cursor support in current database" unless pg?
  end

  def teardown
    DatabaseCleaner.cl
    
  def test_cursor_batches_with_scope
    batches = OccamsRecord
      .query(Widget.order("name"))
      .find_in_batches_with_cursor(batch_size: 3)
      .map { |batch|
        batch.map(&:name)
      }
    assert_equal [
      ["Widget A", "Widget B", "Widget C"],
      ["Widget D", "Widget E", "Widget F"],
      ["Widget G"],
    ], batches
  end