Skip to content

Address code review comments from PR #2551Β #2554

@mroderick

Description

@mroderick

The following comments were left on PR #2551 by @olleolleolle:


Comment 1: Test organization

olleolleolle Apr 9, 2026

Ergonomics: I assume it'd be possible to have a `describe "handling deduplication"` block, wrapping these test cases, and placing them in a spec/models/invitation_manager_spec.rb, so that "flipping between test and implementation" works in an expected way.

Suggested action: Move the deduplication tests from `spec/models/invitation_manager_deduplication_spec.rb` into `spec/models/invitation_manager_spec.rb` under a `describe "handling deduplication"` block.


Comment 2: Use `described_class` instead of hardcoded class name

olleolleolle Apr 9, 2026

Suggested change:
```ruby
subject(:manager) { InvitationManager.new }
```
to:
```ruby
subject(:manager) { described_class.new }
```

Very minor in this test file, but in other cases, when it's repeated a lot in a test, it makes renaming classes more cumbersome.

Suggested action: Update the test file to use `described_class.new` instead of `InvitationManager.new`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions