1
在Rails,我们可以使用MINITEST这个语法:如何在Minitest中使用块语法?
test "true" do
assert true
end
当我尝试使用这种语法在我的宝石,我得到一个ArgumentError
(错误的参数个数)。
要清楚,我不在乎rspec语法(我喜欢assert
而不是describe
块)。我只想写test "foo" do
而不是def test_foo
。
我该怎么做?
我test_helper.rb
几乎是空的:
gem 'minitest'
require 'minitest/autorun'
require 'foo/bar'