public
Fork of sam/dm-core
Description: DataMapper - Core
Homepage: http://datamapper.org
Clone URL: git://github.com/somebee/dm-core.git
Search Repo:
added basic integrationspec for finder-functionality
somebee (author)
Thu May 15 10:55:13 -0700 2008
commit  11d862153ffdb01de64f815983738af87388bc33
tree    2e4f3b57e8cdf4c97adf3bab72d28c7c0a5bb8e4
parent  9c9faa5cbf722af4e8336edb604311ce0e5cbc3c
...
427
428
429
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
430
431
432
...
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
0
@@ -427,6 +427,21 @@
0
         s.host.should_not be_nil
0
         s.host.id.should == 10
0
       end
0
+
0
+ it 'should have finder-functionality' do
0
+ h = repository(:sqlite3) do
0
+ Host.first(:id => 1)
0
+ end
0
+
0
+ h.slices.should have(2).entries
0
+
0
+ s = h.slices.all(:name => 'slice2')
0
+
0
+ s.should have(1).entries
0
+ s.first.id.should == 2
0
+
0
+ h.slices.first(:name => 'slice2').should == s.first
0
+ end
0
 
0
       describe "many-to-one and one-to-many associations combined" do
0
         before do

Comments

    No one has commented yet.