Sha256: 36f04160694137684a0c5addd24bfa83b29e81ea18ddf88d99091b7b48ec499f

Contents?: true

Size: 334 Bytes

Versions: 2

Compression:

Stored size: 334 Bytes

Contents

require 'test/unit'
require_relative 'triangle.rb'

class TestTri < Test::Unit::TestCase
  def test_basic
    require 'byebug'
    byebug
    solutions = []
    0.upto(5) do |i|
      solutions << triangle(i)
    end
    assert_equal([0, 1, 3, 6, 10, 15], solutions,
                 "Testing the first 5 triangle numbers")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
byebug-1.4.2 old_doc/test-triangle.rb
byebug-1.4.1 old_doc/test-triangle.rb