spec/unit/virtus/attribute/string_spec.rb in virtus-0.0.3 vs spec/unit/virtus/attribute/string_spec.rb in virtus-0.0.4

- old
+ new

@@ -6,11 +6,10 @@ let(:attribute_value) { 'red john' } let(:attribute_value_other) { :'red john' } end describe '#typecast' do - let(:model) { Class.new { include Virtus } } - let(:attribute) { model.attribute(:name, String) } + let(:attribute) { Virtus::Attribute::String.new(:name) } let(:value) { 1 } let(:typecast_value) { '1' } subject { attribute.typecast(value) }