在Rails中,我们可以使用以下语法来使用Minitest:
当我在我的gem中尝试使用这个语法时,我会得到一个ArgumentError(参数数量不正确)。
明确一下,我不喜欢rspec的语法(我更喜欢assert而不是describe块)。我只想写
我该怎么做?
我的
test "true" do
assert true
end
当我在我的gem中尝试使用这个语法时,我会得到一个ArgumentError(参数数量不正确)。
明确一下,我不喜欢rspec的语法(我更喜欢assert而不是describe块)。我只想写
test "foo" do
而不是def test_foo
。我该怎么做?
我的
test_helper.rb
几乎是空的:gem 'minitest'
require 'minitest/autorun'
require 'foo/bar'