Closed wayne5540 closed 4 years ago
Test breaks because ActiveSupport
requires Ruby > 2.2.2. Not caused by this PR.
Might be worth rebasing this PR against master to see if the tests will be happier with all the gem bumps that have happened since then.
Rebased. CI still failed. Found reason.
This PR failed the test with Ruby < 2.3 because ActiveModel::AttributeAssignment
was introduced by rails 5+. reference
Run the CI with Ruby verison < 2.3 will use activemode 4.2.11 version which has not yet implemented ActiveModel::AttributeAssignment
module.
To make this PR works we need to lock dependency to activemodel > 5.0
which I don't know if it worth.
Thanks for investigating @wayne5540
No we definitely cannot lock to > 5.0
. I'm still on 4.x
(just upgraded my massive legacy app from rails3 last week!)
@ruckus Yes, agree! Feel free to close this PR.
Closing for now. This PR requires activemodel > 5.0
Changes
Add following functions by including ActiveModel::AttributeAssignment:
Notes
assign_attributes
test case, it's duplicated with ActiveModel's test but I think it's ok to duplicate it so we can make sure it works on this gem.2.14.1
which is relatively old compare to current version3.8.0
, this bothered me because I was trying to useaggregate_failures
function to test getters from#assign_attributes
separately so there won't be dependency with#attributes
test, are you considering updaterspec
to current version in the future? Happy to help with it as well.Reference