assert_nothing_raised do
@board.make_move(0,0,Board::HUMAN)
end
과 문서 말 :Ruby : 어떻게 assert_nothing_raised를 사용합니까?
이Passes if block does not throw anything.
Example:
assert_nothing_thrown do
[1, 2].uniq
end
내 make_move 방법 : 나는 오류가
def make_move(x, y, player)
return false
end
가 :
test_can_make_valid_move_in_the_first_row(BoardTest):
ArgumentError: wrong number of arguments (1 for 2)
어떤 테스트 프레임 워크는 당신이 사용하고 있습니까? 루비 자신의 유닛/테스트? [minitest] (https://github.com/seattlerb/minitest)? 다른 것? – Phrogz
루비의 단위 테스트. – NullVoxPopuli