Sha256: af920a3ef153fc37d16b5536a71c636cd34be7c57f11740a9d321360f94a3bc6
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
require_relative 'spec_helper' require 'ixtlan/datamapper/immutable' class C include DataMapper::Resource include Ixtlan::DataMapper::Immutable property :id, Serial property :name, String timestamps :at end DataMapper.finalize DataMapper.auto_migrate! describe Ixtlan::DataMapper::Immutable do subject { C.create :name => 'huffalump' } it 'is valid and persistent' do subject.valid?.must_equal true subject.persistence_state?.must_equal true end it 'is valid and persistent' do subject.name = 'noone' subject.valid?.must_equal false subject.save.must_equal false end end
Version data entries
2 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ixtlan-datamapper-0.1.0 | spec/immutable_spec.rb |
ixtlan-datamapper-0.1.0 | spec/modified_by_spec.rb~ |