Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure that validation specs work for ActiveModel without ActiveRecord #1580

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

stonefield
Copy link
Contributor

This change addresses issue #1553
It is a simple one liner allowing ActiveModel related matchers to run when ActiveRecord is not used.

There are no specs for this change due the fact that stubbing of the constant namespace is neither recommended, nor possible.

Copy link
Member

@matsales28 matsales28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good for me. Left a small suggestion for a small improvement and to adjust the Rubocop warning.

Thanks for your contribution!

lib/shoulda/matchers/rails_shim.rb Outdated Show resolved Hide resolved
@matsales28 matsales28 merged commit 5d60245 into thoughtbot:main Dec 1, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants