-
Notifications
You must be signed in to change notification settings - Fork 120
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
Remove unused code from pay-leave-for-parents #2006
Merged
chrisroos
merged 3 commits into
master
from
remove-unused-code-from-pay-leave-for-parents
Oct 14, 2015
Merged
Remove unused code from pay-leave-for-parents #2006
chrisroos
merged 3 commits into
master
from
remove-unused-code-from-pay-leave-for-parents
Oct 14, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looks good to me. Well spotted! 😄 |
The both-shared-pay snippet is rendered by the following outcomes: * outcome_mat-leave_mat-pay_pat-leave_pat-pay_both-shared-leave_both-shared-pay * outcome_mat-leave_mat-pay_pat-pay_mat-shared-leave_both-shared-pay * outcome_mat-pay_pat-leave_pat-pay_pat-shared-leave_both-shared-pay * outcome_mat-pay_pat-pay_both-shared-pay These outcomes can only be reached if the due date is on or after 5 April 2015. This means that the check for `$IF range_in_2013_2014_fin_year?(due_date)` will never be true.
The pat-shared-pay snippet is rendered by the following outcomes: * outcome_mat-allowance_mat-leave_pat-leave_pat-pay_both-shared-leave_pat-shared-pay * outcome_mat-allowance_mat-leave_pat-leave_pat-pay_pat-shared-leave_pat-shared-pay * outcome_mat-allowance_mat-leave_pat-pay_mat-shared-leave_pat-shared-pay * outcome_mat-allowance_mat-leave_pat-pay_pat-shared-pay * outcome_mat-allowance_pat-leave_pat-pay_pat-shared-leave_pat-shared-pay * outcome_mat-allowance_pat-pay_pat-shared-pay These outcomes can only be reached if the due date is on or after 5 April 2015. This means that the check for `$IF range_in_2013_2014_fin_year?(due_date)` will never be true.
The mat-shared-pay snippet is rendered by the following outcomes: * outcome_mat-leave_mat-pay_mat-shared-leave_mat-shared-pay * outcome_mat-leave_mat-pay_pat-leave_both-shared-leave_mat-shared-pay * outcome_mat-pay_mat-shared-pay * outcome_mat-pay_pat-leave_pat-shared-leave_mat-shared-pay These outcomes are all reached from employment_details_of_partner_2b, which can only be reached from employment_details_of_partner_2a, which in turn can only be reached if the due date is on or after 5 Apr 2015. This means that the check for `$IF range_in_2013_2014_fin_year?(due_date)` will never be true.
752dfac
to
811576a
Compare
Rebased and force pushed in preparation for merging. |
chrisroos
added a commit
that referenced
this pull request
Oct 14, 2015
…ave-for-parents Remove unused code from pay-leave-for-parents
chrisroos
added a commit
that referenced
this pull request
Oct 14, 2015
I've arbitrarily chosen salary amounts of £10,000/year. I came up with the due dates up by running the regression tests multiple times until I was confident that I was covering all code branches in the outcomes/snippets. I did this by adding marker text in the various conditionals, running the regression tests and then comparing the marker text in the test artefacts to the marker text in the outcomes/snippets. This set of due dates allows me to reach each path. This approach helped me find some unused code paths which I've removed in PR #2006.
chrisroos
added a commit
that referenced
this pull request
Oct 15, 2015
I've arbitrarily chosen salary amounts of £10,000/year. I came up with the due dates up by running the regression tests multiple times until I was confident that I was covering all code branches in the outcomes/snippets. I did this by adding marker text in the various conditionals, running the regression tests and then comparing the marker text in the test artefacts to the marker text in the outcomes/snippets. This set of due dates allows me to reach each path. This approach helped me find some unused code paths which I've removed in PR #2006.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I came across this unused code while adding regression tests for pay-leave-for-parents.
I think it makes sense to remove it before converting pay-leave-for-parents to a Ruby Smart Answer.
Expected user-visible changes