Sha256: b0b6928855cc6f78dbbbb91c696bb3c0d7abd37cfad53bea41b993808deb99d4
Contents?: true
Size: 619 Bytes
Versions: 9
Compression:
Stored size: 619 Bytes
Contents
require 'spec_helper' describe Virtus::Attribute::DefaultValue, '.build' do subject { described_class.build(default) } context 'when default is a symbol' do let(:default) { :symbol } it { should be_instance_of(Virtus::Attribute::DefaultValue::FromSymbol) } end context 'when default is a callable' do let(:default) { Proc.new {} } it { should be_instance_of(Virtus::Attribute::DefaultValue::FromCallable) } end context 'when default is a clonable' do let(:default) { "I can be cloned" } it { should be_instance_of(Virtus::Attribute::DefaultValue::FromClonable) } end end
Version data entries
9 entries across 9 versions & 2 rubygems