Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions docusaurus/docs/ruby/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ pagination_prev: null

# Ruby Troubleshooting

## `NameError: uninitialized constant MyModule::MyModelName`

Try with full namespacing `::SomeModule::MyModule::MyModelName`.

## Debug Knapsack Pro on your development environment/machine

### Regular Mode
Expand Down Expand Up @@ -516,3 +512,25 @@ Please consider:

- [Splitting by test examples](split-by-test-examples.mdx) if you have a bottleneck file that is packed with test examples
- If it's a retry, remember that [`KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true`](reference.md#knapsack_pro_fixed_queue_split-queue-mode) uses a cached split

## Execution times are all 0 seconds in Minitest

When using `minitest-spec-rails`, avoid the [unsupported *outer describe*](https://github.com/metaskills/minitest-spec-rails?tab=readme-ov-file#test-styles). Otherwise, Knapsack Pro won't be able to track the execution time of each test.

```ruby
# ⛔️ Bad
require 'test_helper'
describe User do
end
```

```ruby
# ✅ Good
require 'test_helper'
class UserTest < ActiveSupport::TestCase
let(:user_ken) { User.create!(email: 'ken@example.com') }

it 'works' do
expect(user_ken).must_be_instance_of User
end
end