Skip to content

Commit e14251d

Browse files
committed
Adding initial tests for Hoop
1 parent e8aaaf6 commit e14251d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/test_rubyhop.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,23 @@ def test_offscreen_eh
9898
assert_equal true, @player.offscreen?
9999
end
100100
end
101+
102+
class TestHoop < MiniTest::Test
103+
104+
def setup
105+
@hoop = Hoop.new
106+
end
107+
108+
def test_initialize
109+
assert_equal 0, @hoop.x
110+
assert_equal 0, @hoop.y
111+
assert_equal true, @hoop.active
112+
end
113+
114+
def test_update
115+
@hoop.update 10
116+
assert_equal -10, @hoop.x
117+
assert_equal 0, @hoop.y
118+
end
119+
120+
end

0 commit comments

Comments
 (0)