Skip to content

Add Set#compare_by_identity & Set#compare_by_identity? specs - #510

Closed
nicoolas25 wants to merge 1 commit into
ruby:masterfrom
nicoolas25:set-compare-by-identity
Closed

nicoolas25 wants to merge 1 commit into
ruby:masterfrom
nicoolas25:set-compare-by-identity

Conversation

@nicoolas25

Copy link
Copy Markdown
Contributor

This is part of #473.

 New methods: Set#compare_by_identity and Set#compare_by_identity?. Feature #12210

This is a naive adaptation from the Hash#compare_by_identity specs.

I wonder if it is recommended to reuse the fixtures from core/hash/fixtures/classes.rb instead of duplicating it. What do you think?

This is a naive adaptation from the Hash#compare_by_identity specs.

See https://bugs.ruby-lang.org/issues/12210
@eregon

eregon commented Oct 15, 2017

Copy link
Copy Markdown
Member

I will need to de-duplicate with #507.
Please check the messages above in #473 :)

@eregon

eregon commented Oct 15, 2017

Copy link
Copy Markdown
Member

I'll merge #507 first, but there are a few more specs here.
I'll try to cherry-pick those so both PRs complement each other :)

@eregon

eregon commented Oct 15, 2017

Copy link
Copy Markdown
Member

I added the extra specs form this PR manually in 0ba04d7, thank you for new specs!

@eregon eregon closed this Oct 15, 2017
@eregon

eregon commented Oct 15, 2017

Copy link
Copy Markdown
Member

Re the fixture, a mock() is perfect for this usage here, so no need for it :)

@nicoolas25

nicoolas25 commented Oct 15, 2017 •

Copy link
Copy Markdown
Contributor Author

Oh I'm deeply sorry about that. I looked but I don't know how I could have missed it 🤦‍♂️

Sorry again for the extra work it gave you.

@eregon

eregon commented Oct 15, 2017

Copy link
Copy Markdown
Member

No worry, it happens and we got a better spec out of it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants