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: droplet_resource_spec.rb
    path of file: ./repos/droplet_kit/spec/lib/droplet_kit/resources
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'spec_helper'

RSpec.describe DropletKit::DropletResource do
  subject(:resource) { described_class.new(connection: connection) }

  include_context 'resources'

  # There's a lot to check
  def check_droplet(droplet, tags = [], overrides = {})
    attrs = {
      id: 19,
      name: 'test.example.com',
      memory: 1024,
      vcpus: 2,
      disk: 20,
      locked: false,
      status: 'active'
    }.merge(overrides)

    attrs.each do |attr, val|
      expect(droplet.send(attr)).to eq attrs[attr]
    end

    expect(droplet.created_at).to be_present
    expect(droplet.backup_ids).to include(449_676_382)
    expect(droplet.snapshot_ids).to include(449_676_383)
    expect(droplet.volume_ids).to include('ffaa8716-59e1-11e8-92b6-0242ac110b0c')
    expect(droplet.action_ids).to be_empty
    expect(droplet.features).to include('ipv6')
    tags.each do |tag|
      expect(droplet.tags).to include(tag)
    end

    expect(droplet.region).to be_a(DropletKit::Region)
    expect(droplet.region.slug).to eq('nyc1')
    expect(droplet.region.name).to eq('New York')
    expect(droplet.region.sizes).to include('1024mb', '512mb')
    expect(droplet.region.available).to be(true)
    expect(droplet.region.features).to include('virtio', 'private_networking', 'backups', 'ipv6')

    expect(droplet.image).to be_a(DropletKit::Image)
    expect(droplet.image.id).to eq(119_192_817)
    expect(droplet.image.name
    
  def check_droplet(droplet, tags = [], overrides = {})
    attrs = {
      id: 19,
      name: 'test.example.com',
      memory: 1024,
      vcpus: 2,
      disk: 20,
      locked: false,
      status: 'active'
    }.merge(overrides)

    attrs.each do |attr, val|
      expect(droplet.send(attr)).to eq attrs[attr]
    end

    expect(droplet.created_at).to be_present
    expect(droplet.backup_ids).to include(449_676_382)
    expect(droplet.snapshot_ids).to include(449_676_383)
    expect(droplet.volume_ids).to include('ffaa8716-59e1-11e8-92b6-0242ac110b0c')
    expect(droplet.action_ids).to be_empty
    expect(droplet.features).to include('ipv6')
    tags.each do |tag|
      expect(droplet.tags).to include(tag)
    end

    expect(droplet.region).to be_a(DropletKit::Region)
    expect(droplet.region.slug).to eq('nyc1')
    expect(droplet.region.name).to eq('New York')
    expect(droplet.region.sizes).to include('1024mb', '512mb')
    expect(droplet.region.available).to be(true)
    expect(droplet.region.features).to include('virtio', 'private_networking', 'backups', 'ipv6')

    expect(droplet.image).to be_a(DropletKit::Image)
    expect(droplet.image.id).to eq(119_192_817)
    expect(droplet.image.name).to eq('Ubuntu 13.04')
    expect(droplet.image.distribution).to eq('ubuntu')
    expect(droplet.image.slug).to eq('ubuntu1304')
    expect(droplet.image.public).to be(true)
    expect(droplet.image.regions).to include('nyc1')

    expect(droplet.size_slug).to eq('1024mb')

    expect(droplet.networks).to be_a(DropletKit::NetworkHash)
    private_v4_network = droplet.networks.v4.first
    expect(private_v4_network.ip_address).to eq('10.0.0.19')
    expect(private_v4_network.netmask).to eq('255.255.0.0')
    expect(private_v4_network.gateway).to eq('10.0.0.1')
    expect(private_v4_network.type).to eq('private')

    public_v4_network = droplet.networks.v4.last
    expect(public_v4_network.ip_address).to eq('127.0.0.19')
    expect(public_v4_network.netmask).to eq('255.255.255.0')
    expect(public_v4_network.gateway).to eq('127.0.0.20')
    expect(public_v4_network.type).to eq('public')

    v6_network = droplet.networks.v6.first
    expect(v6_network.ip_address).to eq('2001::13')
    expect(v6_network.gateway).to eq('2400:6180:0000:00D0:0000:0000:0009:7000')
    expect(v6_network.cidr).to eq(124)
    expect(v6_network.type).to eq('public')

    expect(droplet.kernel).to be_a(DropletKit::Kernel)
    expect(droplet.kernel.id).to eq(485_432_985)
    expect(droplet.kernel.name).to eq('DO-recovery-static-fsck')
    expect(droplet.kernel.version).to eq('3.8.0-25-generic')
  end