Should return sum of two elements
def sum(i1, i2)
i1 + i2
end
# From Ruby 3.0, RSpec is used under the hood.
# See https://rspec.info/
# Defaults to the global `describe` for backwards compatibility, but `RSpec.desribe` works as well.
describe "Example" do
it "should return the sum" do
expect(sum(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