spec/spec_helper.rb in dm-rspec-0.1.1 vs spec/spec_helper.rb in dm-rspec-0.1.2

- old
+ new

@@ -46,10 +46,11 @@ class Book include DataMapper::Resource property :id, Serial property :name, String belongs_to :author + has 1, :foreword has n, :genres, :through => Resource has n, :taggings has n, :tags, :through => :taggings validates_presence_of :name validates_uniqueness_of :name, :message => 'Book name must be unique!' @@ -88,8 +89,12 @@ property :id, Serial belongs_to :tag belongs_to :book end +class Foreword + include DataMapper::Resource + property :id, Serial +end DataMapper.finalize DataMapper.auto_migrate!