Take the 2008 Git User's Survey and help out! [ hide ]

public
Rubygem
Description: DataMapper - Core
Homepage: http://datamapper.org
Clone URL: git://github.com/sam/dm-core.git
Search Repo:
confirming namespaced models behave when belongs_to is called
Adam French (author)
Wed May 07 16:37:23 -0700 2008
commit  d18d2d5d4a8feba60d4e59a1c9683542831ae1bb
tree    29a286648744a5bd49837687e95e6d25328a8beb
parent  99388e433be406b778199fa16218a2ef85afcb4d
...
124
125
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
128
129
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
0
@@ -124,6 +124,21 @@ begin
0
         yard.should respond_to(:engine)
0
         yard.should respond_to(:engine=)
0
       end
0
+
0
+ it "#many_to_one with namespaced models" do
0
+ module FlightlessBirds
0
+ class Ostrich
0
+ include DataMapper::Resource
0
+ property :id, Fixnum, :serial => true
0
+ property :name, String
0
+ many_to_one :sky # there's something sad about this :'(
0
+ end
0
+ end
0
+
0
+ FlightlessBirds::Ostrich.properties.slice(:sky_id).should_not be_empty
0
+
0
+ end
0
+
0
 
0
       it "should load the associated instance" do
0
         y = repository(:sqlite3).all(Yard, :id => 1).first

Comments

    No one has commented yet.