这是我第一次使用 RubyMine,我无法让测试框架识别测试。
我已阅读有关 minitest 的问题,并尝试将其应用于测试单元,但没有奏效。
这是我的内容Gemfile
:
gem 'test-unit', '~> 3.0.8'
这是包含测试的 ruby 类的一部分:
require 'test/unit'
def score(dice)
# code of the function
end
class Greed < Test::Unit::TestCase
def test_score_of_an_empty_list_is_zero
assert_equal 0, score([])
end
end
我可能遗漏了一些东西,但我无法找到解决方案。