Sha256: 6000ee90a8354e547012b8cc307e89cd83b78c0bd3dd790bf68074399fbbbe50
Contents?: true
Size: 668 Bytes
Versions: 5
Compression:
Stored size: 668 Bytes
Contents
require 'spec_helper' describe Virtus::Attribute::Array do it_should_behave_like 'Attribute' do let(:attribute_name) { :colors } let(:attribute_value) { [ 'red', 'green', 'blue' ] } let(:attribute_value_other) { [ 'orange', 'yellow', 'gray' ] } let(:attribute_default) { [] } let(:attribute_default_proc) { lambda { |instance, attribute| attribute.name == :colors } } end describe '#coerce' do let(:attribute) { described_class.new(:colors) } subject { attribute.coerce(value) } context 'with a Hash' do let(:value) { { :foo => 'bar' } } it { should == [ [:foo, 'bar'] ] } end end end
Version data entries
5 entries across 5 versions & 1 rubygems