-
-
Notifications
You must be signed in to change notification settings - Fork 388
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 specs for Module#refinements
and Refinement#refined_class
#1027
Add specs for Module#refinements
and Refinement#refined_class
#1027
Conversation
417cc29
to
7f77f08
Compare
core/module/refinements_spec.rb
Outdated
end | ||
end | ||
|
||
m.refinements.should == [refined_integer, refined_string] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Not sure whether the order is guarantied. I suppose it isn't, so we may just sort both arrays, I mean:
m.refinements.should == [refined_integer, refined_string] | |
m.refinements.sort.should == [refined_integer, refined_string].sort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if m.refinemets.sort
works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, right. Will sorting by object_id
or to_s
be working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, both are correct. Should I change it to
m2.refinements.sort_by(&:object_id).should == ScratchPad.recorded.sort_by(&:object_id)
then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
And in used_refinements
(#1028) also order is not guarantied, so sorting probably also makes sense.
7f77f08
to
d8f052d
Compare
53b37be
to
256f3ea
Compare
256f3ea
to
354edd9
Compare
Thank you for the specs! |
#1016
[Feature #12737]