Sha256: d673e7e9530c51983bba1d6bbd1c100c91331c475dadd12a2669896a8ddb110f

Contents?: true

Size: 538 Bytes

Versions: 9

Compression:

Stored size: 538 Bytes

Contents

require 'spec_helper'

describe Virtus::Attribute::DefaultValue::FromClonable, '#call' do
  subject { object.call(instance) }

  let(:object)    { described_class.new(value) }
  let(:value)     { mock('value')              }
  let(:instance)  { mock('instance')           }
  let(:response)  { mock('response')           }
  let(:clone)     { mock('clone')              }

  before { value.stub(:clone => clone) }

  it { should be(clone) }

  it 'clones the value' do
    value.should_receive(:clone).with(no_args)
    subject
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
virtus-0.5.5 spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb
virtus-0.5.4 spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb
virtus-0.5.3 spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb
virtus-0.5.2 spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb
virtus-0.5.1 spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb
virtus-0.5.0 spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb
virtus-0.4.2 spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb
virtus-0.4.1 spec/unit/virtus/attribute/default_value/from_clonable/call_spec.rb