Sha256: 8584a8aa0e55de3dd84bcefbc284947256175818f8b092595c7a74bd77f0b481

Contents?: true

Size: 373 Bytes

Versions: 6

Compression:

Stored size: 373 Bytes

Contents

#!/usr/bin/env ruby
require "test/unit"
require "tri2.rb"
require "rubygems"
require "ruby-debug"
Byebug.start

class TestTri < Test::Unit::TestCase
  def test_basic
    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

6 entries across 6 versions & 1 rubygems

Version Path
byebug-1.1.0 old_doc/test-tri2.rb
byebug-1.0.3 old_doc/test-tri2.rb
byebug-1.0.2 old_doc/test-tri2.rb
byebug-1.0.1 old_doc/test-tri2.rb
byebug-1.0.0 old_doc/test-tri2.rb
byebug-0.0.1 doc/test-tri2.rb