5 ms·
https://github.com/rails/rails/commit/e81f3c210eca074ed6227bd1c40835d44761c09e https://github.com/rails/rails/commit/e81f3c210eca074ed6227b...
by onionisafruit 4y ago
https://github.com/rails/rails/commit/e81f3c210eca074ed6227bd1c40835d44761c09e https://github.com/rails/rails/commit/e81f3c210eca074ed6227b...
- drewcoo 4y agoSad. It's meaningless without the shaming.
- ryan-allen 4y agoShaming others is and has been part of the Ruby on Rails culture since its inception.
- jeroenhd 4y agoI sort of agree with the idea, the developer calling this code may not be responsible for the mess that necessitated the call in the first place. A name like this_code_sucks_and_these_tests_wre_order_dependent would be much more appropriate. It'd still be a name that would at least raise some eyebrows during code review so you'd have to write some kind of explanation why you're enabling this.
- abledon 4y agowhich commit originally put it in? That guy was a comedian
- jan_Inkepa 4y agoThis is the commit that added it, with the description "users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!" https://github.com/rails/rails/blob/6ffb29d24e05abbd9ffe3ea974140d6c70221807/actionmailer/test/abstract_unit.rb https://github.com/rails/rails/blob/6ffb29d24e05abbd9ffe3ea9... So the "I" refers not to the general user of the function, but to the implementer of the functionality, it seems. Code philology of the day!
- trynewideas 4y agoYou didn't follow the blame further. First, the flag is provided by minitest. That commit is an implementation of the flag in Rails. Second, 6ffb29d moved it to prevent Rails's test framework from setting it _by default_. 281f488[1] actually added it to Rails. minitest/minitest#a4553e2[2] appears to have added the docstring and test case to minitest. 1: https://github.com/rails/rails/commit/281f488fffc176084bf77c3ba5b1f1c4d6ab5680 https://github.com/rails/rails/commit/281f488fffc176084bf77c... 2: https://github.com/minitest/minitest/commit/a4553e2e127072c93edfaf9eabc1d8eb187d437f https://github.com/minitest/minitest/commit/a4553e2e127072c9...
- abledon 4y agodid you find all this through _clicking_ in the github UI or did you use a fancier tool on your computer? impressive sleuthing!
- trynewideas 4y agoAll through GitHub. 1. From https://github.com/rails/rails/blob/6ffb29d24e05abbd9ffe3ea974140d6c70221807/actionmailer/test/abstract_unit.rb https://github.com/rails/rails/blob/6ffb29d24e05abbd9ffe3ea9..., click "Blame" on the header bar over the file contents. 2. Scroll down to the line and click on the commit in the left column. 3. Scroll down to the part of the commit that removed the line from its previous location, in activesupport/lib/active_support/test_case.rb. 4. Click the three-dots menu in that file's header bar and select "View file". 5. Click "History" in the header bar of the contributors, above the file contents. 6. I guessed here that it was introduced in commit 281f488 based on its message: "Use the method provided by minitest to make tests order dependent". Clicking through to it confirms that. There's also a comment here that identified the problem which led to, and provided context for, the change in 6ffb29d. The OP is from minitest's documentation, so to find the introduction in minitest, it's basically the same process. 1. Go to https://github.com/minitest/minitest https://github.com/minitest/minitest. 2. Search the repo for the method name. Even just "i_suck" will match the commit. 3. Select the oldest commit in the results. That's a4553e2.