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

Ability to skip/whitelist mutations #326

Open
plexus opened this issue May 9, 2015 · 3 comments
Open

Ability to skip/whitelist mutations #326

plexus opened this issue May 9, 2015 · 3 comments

Comments

@plexus
Copy link
Contributor

plexus commented May 9, 2015

We just ran into an interesting case, there's code that uses const_get(foo, false). The false prevents lookup in ancestors.

Replacing false with nil also works, but is undocumented. It is less clear, and might break in the future. So leaving the false in we have live mutant.

So, what to do? Would you replace it with nil anyway? Do we need some way to flag that this statement should not be mutated?

@mbj
Copy link
Owner

mbj commented May 9, 2015

Mhh, you could always create a test like:

expect(that_object).to receive(:const_get).with(foo, false)

To "nail this specific API version".

But still yeah, we should have a mechanism to whitelist certain mutations. The infrastructure is there, the UI not.

@janko
Copy link

janko commented May 19, 2015

Yes, I would also really like that. I have a different reason for this. When I'm comparing Symbols, I would still like to use #==, even though I could use #equal? (but I can't use #== because I'll still have living mutants).

@mbj
Copy link
Owner

mbj commented Aug 8, 2015

I like the idea, but I do not have a need to do it for my projects. So tagging as not-on-authors-free-time to encourage funding or (preferred) outside contribution.

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

No branches or pull requests

3 participants