<NME> test_helper.rb
<BEF> ENV['RAILS_ENV'] = 'test'

require 'simplecov'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'mocha/mini_test'
require 'minitest/reporters'
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new

module ActiveSupport
  class TestCase
    # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
  class TestCase
    # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
    #
    # Note: You'll currently still have to declare fixtures explicitly in integration tests
    # -- they do not yet inherit this setting
    # fixtures :all

    # Add more helper methods to be used by all tests here...
  end
end

<MSG> Add leaderboards controllers

There are four controllers:

* Leadeboard::DailiesController
* Leadeboard::WeekliesController
* Leadeboard::MonthliesController
* Leadeboard::OverallsController

They refer respectively to the collections:

* DailyScore
* WeeklyScore
* MonthlyScore
* OverallScore

Controllers tests share the same code by including a support module.

The view leaderboard partial template doesn't rely on the dynamic *you*
class anymore because it doesn't need to be cached.

<DFF> @@ -7,6 +7,8 @@ require 'sucker_punch/testing/inline'
 require 'minitest/reporters'
 Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
 
+Dir[Rails.root.join('test/support/**/*.rb')].each { |f| require f }
+
 module ActiveSupport
   class TestCase
     # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.

{'addition_count': 2, 'commit_subject': 'Add leaderboards controllers', 'deletion_count': 0, 'file_extension': '.rb', 'lang': 'rb', 'license': 'mit', 'repo_name': 'tomatoes-app/tomatoes'}