Sha256: b6c240d730ebd0104bf48c43878a491ef62cc0200c529f8dd4d78e4e09a1ec85
Contents?: true
Size: 477 Bytes
Versions: 11
Compression:
Stored size: 477 Bytes
Contents
require File.expand_path("../helper", __FILE__) class Article < Ohm::Model include Ohm::Versioned attribute :title attribute :content end test do a1 = Article.create(:title => "Foo Bar", :content => "Lorem ipsum") a2 = Article[a1.id] a1.update({}) begin a2.update(:title => "Bar Baz") rescue Ohm::VersionConflict => ex end expected = { :title => "Bar Baz", :_version => "1", :content => "Lorem ipsum" } assert_equal expected, ex.attributes end
Version data entries
11 entries across 11 versions & 1 rubygems