<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -42,16 +42,15 @@ module Wheels
         @repository.select(query).first
       end
 
-      def all(target, options = nil)
-        raise ArgumentError.new(&quot;Wheels::Orm::Session#all requires a block&quot;) unless block_given?
-        
+      def all(target)
         mapping = @repository.mappings[target]
         criteria = Wheels::Orm::Query::Criteria.new(mapping)
-        yield(criteria)
+
+        yield(criteria) if block_given?
 
         @repository.select(Query.new(mapping, criteria.__options__, criteria.__conditions__))
       end
-      
+
       def find(target, options, conditions)
         mapping = @repository.mappings[target]
 </diff>
      <filename>lib/wheels/orm/session.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,5 +3,5 @@ log4j.appender.stdout.Target=System.out
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
 
-log4j.rootLogger=debug, stdout
+log4j.rootLogger=warn, stdout
 log4j.logger.com.mchange.v2.log.MLog=warn
\ No newline at end of file</diff>
      <filename>log4j.properties</filename>
    </modified>
    <modified>
      <diff>@@ -231,74 +231,76 @@ module Integration::AbstractRepositoryTest
     schema.destroy(@zoo)
     schema.destroy(@city)
   end
-  
+
   def test_all_with_single_condition
     schema = Wheels::Orm::Schema.new(&quot;default&quot;)
     schema.create(@person)
-    
+
     bob = @person.new
     bob.name = &quot;Bob&quot;
     bob.gpa = 4.0
     orm.save(bob)
-    
+
     assert_nothing_raised do
-      people = orm.all(@person, :limit =&gt; 1) { |person| person.name.eq(&quot;Bob&quot;) }
+      people = orm.all(@person) { |person| person.name.eq(&quot;Bob&quot;) }
       assert_equal(1, people.size)
     end
   ensure
     schema.destroy(@person)
   end
-  
+
   def test_all_with_multiple_conditions
     schema = Wheels::Orm::Schema.new(&quot;default&quot;)
     schema.create(@person)
-    
+
     jimmy = @person.new
     jimmy.name = &quot;Jimmy&quot;
     jimmy.gpa = 3.5
     orm.save(jimmy)
-    
+
     assert_nothing_raised do
       people = orm.all(@person) do |person|
         person.gpa.gt(3).or(person.name.eq(&quot;Jimmy&quot;))
       end
-      
+
       assert_equal(1, people.size)
     end
   ensure
     schema.destroy(@person)
   end
-  
+
   def test_all_with_limit_and_order
     schema = Wheels::Orm::Schema.new(&quot;default&quot;)
     schema.create(@person)
-    
+
     mike = @person.new
     mike.name = &quot;Mike&quot;
     mike.gpa = 1.2
     orm.save(mike)
-    
+
     scott = @person.new
     scott.name = &quot;Scott&quot;
     scott.gpa = 4.0
     orm.save(scott)
-    
+
     bernerd = @person.new
     bernerd.name = &quot;Bernerd&quot;
     bernerd.gpa = 3.6
     orm.save(bernerd)
-    
+
     sam = @person.new
     sam.name = &quot;Sam&quot;
     sam.gpa = 0.1
     orm.save(sam)
-    
+
+    assert_equal(4, orm.all(@person).size)
+
     assert_nothing_raised do
       people = orm.all(@person) do |person|
         person.limit 3
         person.order(person.gpa.desc, person.name)
       end
-      
+
       assert_equal(3, people.size)
       assert_equal('%1.1f' % [scott.gpa],     '%1.1f' % [people[0].gpa])
       assert_equal('%1.1f' % [bernerd.gpa],   '%1.1f' % [people[1].gpa])</diff>
      <filename>tests/integration/repositories/abstract.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>123bd9b4c7ab2c981ded75c843424c67c51294c6</id>
    </parent>
  </parents>
  <author>
    <name>Bernerd Schaefer</name>
    <email>bj.schaefer@gmail.com</email>
  </author>
  <url>http://github.com/wiecklabs/clipper/commit/dfe8db79ad110076f1596d7be7593b7689bc6f4b</url>
  <id>dfe8db79ad110076f1596d7be7593b7689bc6f4b</id>
  <committed-date>2009-02-27T09:09:22-08:00</committed-date>
  <authored-date>2009-02-27T09:09:22-08:00</authored-date>
  <message>Fixing contract for Session.all: no second argument, and block is optional.
Adding failing assertion for test_all_with_limit_and_order.</message>
  <tree>ad830926bcfd5c040a7ad236a3289ea26c184704</tree>
  <committer>
    <name>Bernerd Schaefer</name>
    <email>bj.schaefer@gmail.com</email>
  </committer>
</commit>
