{"repo":"rubocop/rubocop-minitest","free":true,"listed":false,"github":"https://github.com/rubocop/rubocop-minitest","clone":"git clone https://github.com/rubocop/rubocop-minitest.git","description":"Code style checking for Minitest files.","language":"Ruby","stars":166,"topics":["ruby","rubocop","linter","static-code","code-formatter","minitest","hacktoberfest"],"license":"MIT","category":"dev-tools","readme_excerpt":"RuboCop Minitest A RuboCop extension focused on enforcing Minitest best practices and coding conventions. The library is based on the guidelines outlined in the community Minitest Style Guide. Installation Just install the rubocop-minitest gem or if you use bundler put this in your Gemfile Usage You need to tell RuboCop to load the Minitest extension. There are three ways to do this: RuboCop configuration file Put this into your .rubocop.yml . Alternatively, use the following array notation when specifying multiple extensions. Now you can run rubocop and it will automatically load the RuboCop Minitest cops together with the standard cops. [!NOTE] The plugin system is supported in RuboCop 1.72+. In earlier versions, use require instead of plugins . Command line Rake task The Cops All cops are located under lib/rubocop/cop/minitest , and contain examples/documentation. The documentation is published here. In your .rubocop.yml , you may treat the Minitest cops just like any other cop. For example: Testing your own cops This gem provides RuboCop::TestCase , a base test case class for testing custom cops with Minitest. Require rubocop/minitest/support in your test helper, then inherit from RuboCop::TestCase to get the assert offense , assert correction , assert no corrections , and assert no offenses assertions: The cop under test is derived from the test class name: CustomCops::MyCopTest resolves CustomCops::MyCop , then RuboCop::Cop::Minitest::MyCop . Define a cop class method i","default_branch":null,"files":null,"tree":[],"storefront":"/r/rubocop","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rubocop/rubocop-minitest/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}