Sha256: ade97d5e4eed3e19ee060011dab5a76663707e31dcfbc935c210fb71157df02d

Contents?: true

Size: 382 Bytes

Versions: 9

Compression:

Stored size: 382 Bytes

Contents

require 'spec_helper'

describe Virtus::Attribute::DefaultValue::FromClonable, '.handle?' do
  subject { described_class.handle?(default) }

  let(:attribute) { mock('attribute') }

  context 'with a clonable' do
    let(:default) { 'clonable'  }

    it { should be(true)  }
  end

  context 'with a non-clonable' do
    let(:default) { 1 }

    it { should be(false)  }
  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/class_methods/handle_spec.rb
virtus-0.5.4 spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_spec.rb
virtus-0.5.3 spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_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/class_methods/handle_spec.rb
virtus-0.5.2 spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_spec.rb
virtus-0.5.1 spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_spec.rb
virtus-0.5.0 spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_spec.rb
virtus-0.4.2 spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_spec.rb
virtus-0.4.1 spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_spec.rb