2014-11-22 62 views
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' 

回答

相关问题