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 matcher for mutating views #293

Open
dkubb opened this issue Feb 2, 2015 · 1 comment
Open

Add matcher for mutating views #293

dkubb opened this issue Feb 2, 2015 · 1 comment
Assignees

Comments

@dkubb
Copy link
Collaborator

dkubb commented Feb 2, 2015

Views often have logic within them that goes untested, and mutant should support mutating the code within the views.

Obviously we attempt to keep as much logic as possible outside of views, where it can be more easily tested, but what does make it into the views should still be tested.

@mbj
Copy link
Owner

mbj commented Feb 2, 2015

@dkubb Thats a good idea.

For my future self / or anyone who want to hack on this:

It probably requires a custom matcher (the pierce in mutant that finds subject), a custom injector (the components that makes mutated ASTs visible to the tests) and a custom expression (the "UI" the users use to "target" a matcher), and a custom subject that represents the view under mutation testing.

Right now we have Mutant::Subject::Method::Instance for instance methods, and a Mutant::Subject::Method::Singleton for singleton methods. This feature will probably yield an Mutant::Subject::View::Erubis or such that is LSP compatible with the interface of Mutant::Subject.

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

2 participants