Sha256: d5277b6ebf0e4e3573a24cb4371b5d6f58ba42e2315fd529b1bfadf7c94aff35
Contents?: true
Size: 453 Bytes
Versions: 4
Compression:
Stored size: 453 Bytes
Contents
require File.dirname(__FILE__) + "/spec_helper" describe 'Legacy mappings' do it('should allow models to map with custom attribute names') do Fruit.first.name.should == 'Kiwi' end it('should allow custom foreign-key mappings') do database do Fruit[:name => 'Watermelon'].devourer_of_souls.should == Animal[:name => 'Cup'] Animal[:name => 'Cup'].favourite_fruit.should == Fruit[:name => 'Watermelon'] end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
datamapper-0.2.3 | spec/legacy_spec.rb |
datamapper-0.2.1 | spec/legacy_spec.rb |
datamapper-0.2.2 | spec/legacy_spec.rb |
datamapper-0.2.4 | spec/legacy_spec.rb |