Sha256: ee8fe32c927c9f7b79366c5cbc0fc84092a8645cb6203192050e491355601982
Contents?: true
Size: 687 Bytes
Versions: 1
Compression:
Stored size: 687 Bytes
Contents
require 'spec_helper' describe Virtus::ValueObject, '#with' do subject { object.with(attributes) } let(:described_class) do Class.new do include Virtus::ValueObject attribute :first_name, String attribute :last_name, String end end let(:object) { described_class.new } let(:attributes) { Hash[:first_name => 'John', :last_name => 'Doe'] } let(:described_class) do Class.new do include Virtus::ValueObject attribute :first_name, String attribute :last_name, String end end it { should be_instance_of(described_class) } its(:first_name) { should eql('John') } its(:last_name) { should eql('Doe') } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
virtus-0.2.0 | spec/unit/virtus/value_object/with_spec.rb |