Sha256: 8af704226129bd9439bc9e6a9ac8cada9acf1bf98eb57528f558751c79d8b9a0
Contents?: true
Size: 613 Bytes
Versions: 5
Compression:
Stored size: 613 Bytes
Contents
require 'spec_helper' describe Virtus::Attribute::String do it_should_behave_like 'Attribute' do let(:attribute_name) { :email } let(:attribute_value) { 'red john' } let(:attribute_value_other) { :'red john' } let(:attribute_default) { '' } let(:attribute_default_proc) { lambda { |instance, attribute| attribute.name == :email } } end describe '#coerce' do let(:attribute) { described_class.new(:name) } let(:value) { 1 } let(:coerce_value) { '1' } subject { attribute.coerce(value) } it { should eql(coerce_value) } end end
Version data entries
5 entries across 5 versions & 1 rubygems