Sha256: e061ecc61ef990d04732c3f1a3a468bf69747a976800cacf6a466a65d7f6c3fd

Contents?: true

Size: 454 Bytes

Versions: 12

Compression:

Stored size: 454 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe DHS::Record do
  describe '#dup' do
    before do
      class Appointment < DHS::Record
      end
    end

    it 'returns a copy of an object' do
      appointment = Appointment.new
      copy = appointment.dup
      expect(copy.inspect).to match(/Appointment/)
      expect(copy).to be_kind_of(Appointment)
      expect(copy.object_id).not_to eql(appointment.object_id)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dhs-1.6.0 spec/record/dup_spec.rb
dhs-1.5.0 spec/record/dup_spec.rb
dhs-1.4.2 spec/record/dup_spec.rb
dhs-1.4.1 spec/record/dup_spec.rb
dhs-1.4.0 spec/record/dup_spec.rb
dhs-1.3.0 spec/record/dup_spec.rb
dhs-1.2.0 spec/record/dup_spec.rb
dhs-1.1.0 spec/record/dup_spec.rb
dhs-1.0.3 spec/record/dup_spec.rb
dhs-1.0.2 spec/record/dup_spec.rb
dhs-1.0.1 spec/record/dup_spec.rb
dhs-1.0.0 spec/record/dup_spec.rb