Sha256: 6c0cc75493cf4a48c93949378451499be0ed1f2bbe5b6eaaae9febfeb4c02fc1

Contents?: true

Size: 426 Bytes

Versions: 2

Compression:

Stored size: 426 Bytes

Contents

require 'spec_helper'

describe Virtus::ValueObject::InstanceMethods, 'duplication' do
  let(:described_class) do
    Class.new do
      include Virtus::ValueObject

      attribute :name, String
    end
  end

  subject { described_class.new }

  it '#clone returns the same instance' do
    subject.should equal(subject.clone)
  end

  it '#dup returns the same instance' do
    subject.should equal(subject.dup)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
virtus-0.5.1 spec/unit/virtus/value_object/instance_methods/duplicates_spec.rb
virtus-0.5.0 spec/unit/virtus/value_object/instance_methods/duplicates_spec.rb