High Rails

Use Minitest for Rails testing

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
View
Minitest Testing
24 rules • 1 standard
View
RSpec Testing
24 rules • 0 standards
View
Jest Testing
24 rules • 2 standards
View
Pytest Testing
24 rules • 2 standards
View
Vitest Testing
24 rules • 3 standards
View
Mocha Testing
24 rules • 0 standards
View
Code Review Standards
58 rules • 0 standards
View

Add This Rule

Sign in to add this rule to your workspace

Sign in with GitHub

Details

Severity
High
Category
Rails
Used in
8 rulesets