def assert_length coll, len
      check_responds_to coll, :length

      assert coll.length == len,
             "Expected coll to have %d items",
             len
    end
def assert_length coll, len
      check_responds_to coll, :length

      assert coll.length == len,
             "Expected coll to have %d items",
             len
    end
If coll is given length, return nil, else raise
 AssertionFailureError.

 @param coll [#length] anything that responds to :length
 @param len [Number] the length to check for

 @raise [AssertionFailureError] if length of coll doesn't match
   given len
 @raise [ArgumentError] if coll doesn't respond to :length

 @return [nil] if length of coll matches given len