This should fix it:

```diff
diff --git a/test/form_builder/association_test.rb b/test/form_builder/association_test.rb
index 8df91e7..e62f970 100644
--- a/test/form_builder/association_test.rb
+++ b/test/form_builder/association_test.rb
@@ -25,7 +25,7 @@ class AssociationTest < ActionView::TestCase
   test 'builder association forwards collection to simple_fields_for' do
     calls = 0
     simple_form_for @user do |f|
-      f.association :company, collection: Company.all.to_a do |c|
+      f.association :company, collection: Company.all do |c|
         calls += 1
       end
     end
diff --git a/test/support/models.rb b/test/support/models.rb
index 70c57ce..1a6bcc9 100644
--- a/test/support/models.rb
+++ b/test/support/models.rb
@@ -17,6 +17,14 @@ Relation = Struct.new(:records) do
   end

   alias_method :to_a, :records
+
+  def to_ary
+    to_a
+  end
+
+  def each(&block)
+    to_a.each(&block)
+  end
 end

 Picture = Struct.new(:id, :name) do
```

the relevant lines are https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/form_helper.rb#L1840 and https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/form_helper.rb#L1843