Skip to content

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

Merged
matsales28 merged 2 commits intothoughtbot:mainfrom
basefarm:active_model_wo_active_record
Dec 1, 2023
Merged

fix: Ensure that validation specs work for ActiveModel without ActiveRecord#1580
matsales28 merged 2 commits intothoughtbot:mainfrom
basefarm:active_model_wo_active_record

Conversation

@stonefield
Copy link
Copy Markdown
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
Copy Markdown
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!

Comment thread lib/shoulda/matchers/rails_shim.rb Outdated
@matsales28 matsales28 merged commit 5d60245 into thoughtbot:main Dec 1, 2023
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