-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
pascals-triangle: Rewrite tests to use hspec with fail-fast. #287
Conversation
remind when that discussion concludes, I think. I may forget otherwise. I have no problems with what I see in here so far |
Tests rewritten to match The only relevant divergence is that, for negative numbers, I decided to return an empty list, mimicking the behavior of |
, ("two rows" , 2, [[1], [1, 1] ]) | ||
, ("three rows" , 3, [[1], [1, 1], [1, 2, 1] ]) | ||
, ("four rows" , 4, [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]]) | ||
, ("negative rows", 0, [ ]) ] |
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.
you didn't actually put a negative number here
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.
My stupid mistake. Have no idea why I changed that.
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.
Fixed! Thanks for catching that, @petertseng! 😄
I'm debating whether to say "maybe the test should explain why negative rows is empty because it's like |
- Rewrite tests to use `hspec`. - Change tests to match `x-common`. - Rewrite the stub solution to be simpler and match the new test suite.
Yup. 👍 |
Both Considering that we have this behavior in |
hspec
.triangle
torows
row
to count lines starting at zero.Considering that there is a ongoing discussion in exercism/problem-specifications#362, I think we should wait it before merging this PR.Related to #211.