Commit 32562f7

mo khan <mo@mokhan.ca>
2013-05-22 02:41:48
map each row to an instance of the target type
1 parent a98149c
Changed files (2)
spec
spec/integration/fixtures/movie_mapping.rb
@@ -16,7 +16,9 @@ class MovieMapping
   end
 
   def find_all_using(connection, clazz)
-    connection[:movies]
+    connection[:movies].map do |row|
+      Movie.new(row)
+    end
   end
 
   def run(map)
spec/integration/example_spec.rb
@@ -31,11 +31,11 @@ describe "orm" do
       results.count.should == 1
     end
 
-    xit "should return each movie with its name" do
+    it "should return each movie with its name" do
       results.first.name.should == 'monsters inc'
     end
 
-    xit "should return instances of the target type" do
+    it "should return instances of the target type" do
       results.first.should be_instance_of(Movie)
     end
   end