Skip to content

counter_cache validation fails with Rails 7.2.beta #1638

@jetienne

Description

@jetienne

Description

Testing counter_cache no longer works with Rails 7.2.beta.

Reproduction Steps

Define an association like this:

belongs_to :company, optional: true, counter_cache: true

The following test will fail:

it { is_expected.to belong_to(:company).optional.counter_cache(true) }

System configuration

shoulda-matchers (6.2.0)

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