title: Difference between "def setup" and "setup do" in Minitest?
body: <p>Are there any differences at all between calling <code>def setup</code> and <code>setup do</code> in Rails Minitests? I had been using <code>def setup</code> this whole time, but I suddenly found that my <code>setup</code> for a particular test file was not being called. When I changed it to <code>setup do</code>, it suddenly worked again (without changing anything else). But I find this very peculiar, and I'd rather stick to <code>def setup</code> for everything if possible, for consistency. Any advice is appreciated.</p>
  
  <pre class="lang-rb prettyprint-override"><code>require 'test_helper'
  require_relative '../../helpers/user_helper'
  
  class FooTest &lt; ActiveSupport::TestCase
    include UserHelper
  
    # This method doesn't get called as-is.
    # But it does get called if I change the below to `setup do`.
    def setup
      # create_three_users is a UserHelper method.
      create_three_users
      @test_user = User.first
    end
  
  
    test 'should abc' do
      # Trying to call @test_user here returned nil.
    end
  end
  </code></pre>