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

Add attribute_types method to match behaviour that Rails 6 ActiveModel::Attributes provides #15

Merged
merged 3 commits into from Apr 29, 2020
Merged

Add attribute_types method to match behaviour that Rails 6 ActiveModel::Attributes provides #15

merged 3 commits into from Apr 29, 2020

Conversation

shevaun
Copy link
Contributor

@shevaun shevaun commented Apr 29, 2020

The shoulda-matchers gem looks for the attribute_types method on a
model class
, and by providing it we can avoid errors caused by
ActiveModelAttributes classes implementing some of the ActiveRecord spec
(e.g. implementing type_for_attribute but not implementing columns).

Shevaun Coker added 2 commits April 29, 2020 13:22
ActiveModel::Attributes provides.

The shoulda-matchers gem looks for the `attribute_types` method on a
model class, and by providing it we can avoid errors caused by
ActiveModelAttribute classes implementing some of the ActiveRecord spec
(e.g. implementing `type_for_attribute` but not implementing `columns`).
@coveralls
Copy link

coveralls commented Apr 29, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling d0459d5 on envato:implement_attribute_types into 8bf38cb on Azdaroth:master.

Copy link
Owner

@Azdaroth Azdaroth left a comment

Choose a reason for hiding this comment

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

Thanks, @shevaun! Looks good.

@Azdaroth Azdaroth merged commit e812865 into Azdaroth:master Apr 29, 2020
@shevaun shevaun deleted the implement_attribute_types branch April 29, 2020 05:07
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.

None yet

3 participants