remove nested method definitions to prevent test warning.

This prevents the following warning:

* CommitsControllerTest#test_in_edgetest/unit warning: method CommitsControllerTest#test_index_for_contributors is redefined