Hello,
For the Ruby last will exercise, test #5 is failing because of a syntax error in the test file.
Hello,
For the Ruby last will exercise, test #5 is failing because of a syntax error in the test file.
![]()
I’ll look into it. Can you give me an example of a solution that fails the test?
Matt sent a PR that is auto-closed as they did that first prior to posting here. Let’s get the communication loop comleted:
The PR is located exercism/ruby#1835.
I have updated the PR there to link to this discussion…
OP mentioned a syntax error needing to be fixed. I don’t see a syntax error being fixed in that PR so I’m a bit confused here. What I do see is that the fifth test’s expected value was changed. Why that change? Perhaps OP can share some insight on that and maybe their solution to the exercise as well.
OP is correct in changing the order of the arguments (even though this wouldn’t cause the test to fail; it would just switch the labels “Actual” and “Expected” in the Results). Unfortunately, he also changed the expected value in the process… which will cause the test to fail for correct solutions.
Note, the Ruby track (along with the majority of Exercism repos) are not open to community contributions. Please do not open PRs against the tracks without first discussing with a track maintainer.
Vaia forked the exercise from the C++ track. The current expected value matches the C++ implementation so if it needs to be changed, that could be potentially relevant to that track as well.
It was Matt, in this case, opening it, getting the message, rather than reading the README, researching other pull requests (opened and closed) and becoming familiar.
In defense of @VaiaPatta1985 she has been “chastised” gently by BethanyG for doing this in the Python track.
I appreciate Vaia for reviewing this, since it is her work that brought Last Will into the Ruby track.
Matt has been welcomed to fix what is really wrong there, if he is willing, with the actual, expected order in the tests. (So @hurley-matt if you are willing, and do that fix there, I will reopen the PR).
Otherwise, that is the work that should be put in place.
And of course @IsaacG thanks for the gentle reminder to both about the process.
For the record IsaacG is one of the guardians of the sanity around here, in terms of helping keep Maintainers not underwhelmed, not overwhelmed, just whelmed the right amount.
I may have done this in yet another track, before getting that message ![]()
I apologize for the confusion. I could be misunderstanding the instructions of the final task of “Define the assemble_code method that returns the resulting code by combining the fragments from the three families to a single Integer result. The method does not have any arguments and relies solely on the information in the relevant namespaces from the families.”
My code solution:
def self.assemble_code
(Zhang::Blue::code_fragment + Zhang::Red::code_fragment) + (Khan::Blue::code_fragment + Khan::Red::code_fragment) + (Garcia::Blue::code_fragment + Garcia::Red::code_fragment)
end
I added all the code fragments for each family member and it equals 3253. I could be completely missing something, but I do not understand where 1925550 comes from.
The instructions in the testament ask you to add all the blue and then all the red fragments. The resulting code is obtained by multiplying both sums.
Thanks for clarifying!
I suggest combining those two paragraphs together or switching the order they are in for clearer instructions.
I’m not a track maintainer to weigh in on that suggestion, but if you’d like to propose a change, it’s helpful to propose a specific change with the exact new language you’re recommending.
One thing at a time, please; let’s fix the bug first. @hurley-matt did you want to change the argument order in the assertions, or shall I?
Thanks @VaiaPatta1985 for bringing Last Will into the Ruby track. As I was doing the exercise, I also noticed that the argument order in assertions were off but the tests would still pass since equality is equality. I fixed them in this PR: test: correct assert_equal argument order in last_will tests by Lemmah · Pull Request #1841 · exercism/ruby · GitHub . I’m sorry y’all for not following process, I didn’t know better. Thanks to @kotp, the fix has been shipped and now I know my way around contributing in future. Cheers.