High
Rails
Use Minitest for Rails testing
Official
Rule Description
Use Minitest for all tests. Do not add RSpec to the project.
Minitest is:
- Rails default, zero configuration
- Faster boot time
- Simpler syntax, less magic
- Already integrated with fixtures
```ruby
class UserTest < ActiveSupport::TestCase
test "validates email presence" do
user = User.new(name: "Test")
assert_not user.valid?
assert_includes user.errors[:email], "can't be blank"
end
end
```
Use fixtures for test data - they're fast and simple.
Included in Rulesets
Rails Standards
36 rules • 1 standard
Minitest Testing
24 rules • 1 standard
RSpec Testing
24 rules • 0 standards
Jest Testing
24 rules • 2 standards
Pytest Testing
24 rules • 2 standards
Vitest Testing
24 rules • 3 standards
Mocha Testing
24 rules • 0 standards
Code Review Standards
58 rules • 0 standards
Add This Rule
Sign in to add this rule to your workspace
Sign in with GitHubDetails
- Severity
- High
- Category
- Rails
- Used in
- 8 rulesets