Skip to content

Commit 2afc192

Browse files
committed
test for method
1 parent 7651aa4 commit 2afc192

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/helper_methods_test.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ def test_hex_color
3131
end
3232
end
3333

34+
def test_p52ruby
35+
p5array = [16777215, 16711680, 255]
36+
ruby_string = "%w(#FFFFFF #FF0000 #0000FF)\n"
37+
result = p52ruby(p5array)
38+
assert_equal(result, ruby_string)
39+
end
40+
3441
def test_dist
3542
ax, ay, bx, by = 0, 0, 1.0, 1.0
3643
assert_in_epsilon(dist(ax, ay, bx, by), Math.sqrt(2), epsilon = 0.0001, msg = '2D distance')

0 commit comments

Comments
 (0)