10 ms·
Your example is Rspec, a testing framework for Ruby, not everyone enjoys it Here's with Minitest (part of std) it "adds two numbers" do calc = Calcu
by Alifatisk 1y ago
Your example is Rspec, a testing framework for Ruby, not everyone enjoys it
Here's with Minitest (part of std)
it "adds two numbers" do
calc = Calculator.new
assert_equal 5, calc.add(2, 3)
end
If you want even closer to yours, the following works just fine
assert calc.add(2, 3) == 5
Better?