Name:Tom H. Lautenbacher
Clan:Le Wagon
Skills:⯁ ruby, ruby on rails, html, css, javascript, crystal, sql, devops, linux, wix, wordpress, bricks ⯁ business development, international business, online marketing, technical marketing, growth hacking, b2c/b2b/b2g sales ⯁ tech startups, business formation, business management, operations, hr, recruiting, accounting, tax, law
Following:513
Followers:505
Allies:502
This comment is hidden because it contains spoiler information about the solution
Awesome job, thanks trashy_incel!
Ruby: The test is broken. It is only possible to complete the kata when submitting without prior testing. The test seems to be unrelated to the kata.
From Ruby 3.0, RSpec is used under the hood.
See https://rspec.info/
Defaults to the global
describe
for backwards compatibility, butRSpec.desribe
works as well.describe "Example" do
it "should return the sum" do
expect(add(1, 1)).to eq(2)
# The following is still supported, but new tests should now use them.
# Test.assert_equals(add(1, 1), 2)
end
end
should return the sum
#<NoMethodError: undefined method
add' for main:Object> main.rb:11:in
block (2 levels) in '/runner/frameworks/ruby/cw-2.rb:180:in
wrap_error' /runner/frameworks/ruby/cw-2.rb:72:in
it'/runner/frameworks/ruby/cw-2.rb:206:in
it' main.rb:10:in
block in '/runner/frameworks/ruby/cw-2.rb:55:in
block in describe' /runner/frameworks/ruby/cw-2.rb:46:in
measure'/runner/frameworks/ruby/cw-2.rb:51:in
describe' /runner/frameworks/ruby/cw-2.rb:202:in
describe'main.rb:9:in `'
Awesome, works like a charm now, thanks!
@Ruby: The random tests in Ruby seem broken, expecting "" as result for all test, preventing from submitting the kata.
This should be 7 kyu since it requires knowledge of more than 1 method.
In Crystal the method name should be distance_between_points (snake case) not distanceBetweenPoints (camel case). Changing it will make it impossible to pass the final tests.
Should be 7 kyu.
This comment is hidden because it contains spoiler information about the solution
The JavaScript translation uses PascalCase for the name of the function (SubtractSum), but according to JavaScript naming conventions it should be using camelCase for this (subtractSum), this should be corrected both in the default code and in the tests.
@Kacarott: Got it. What is your opinion on the part if it was interesting enough, i.e. if it would be worth to revive it? I can only see the downvotes, not the reason for each vote, correct?
Does it still make sense now for me to add the automatic tests as I had planned to do, so to improve the kata, or is this retirement a permanent thing and the kata is dismissed for good, so I should forget about it?
Thanks for the insights, Fbasham! I see. Does it still make sense now for me to add the automatic tests as I had planned to do after your comment, so to improve the kata, or is this retirement a permanent thing and the kata is dismissed for good?
With an empty string it returns true, yes. That might seem counter intuitive in regards of the kata's description, but it is what the tests expect when no g is found at all, see e.g.: ("A half of a half is a quarter.", true)
Downvotes and retirement
Can anyone please enlighten me, why my kata received as many downvotes and has been retired?
What did you dislike / what should I do better next time and what was the reason for ditching it alltogether?
Loading more items...