2017-05-04 34 views
-2

我得到以下消息 undefined method 'assert_equal' for #<Object:0x007fda5fe47780> (NoMethodError)未定义的方法`assert_equal”为#<对象:0x007fda5fe47780>(NoMethodError)

我已经加入所有有关宝石,但仍得到相同的错误。请参阅附加链接到github回购enter link description here

有什么建议吗?

+0

https://github.com/cucumber/cucumber/wiki/Using-MiniTest –

+0

你能否粘贴你的代码,这似乎是造成这个错误?我相信它的''api_excercise/features/step_definitions/user_id.rb'',但我不确定没有进一步的解释。 –

回答

0

在使用方法assert_equal之前添加include Test::Unit::Assertions

通常您会创建一个测试类,它将是Test::Unit::TestCase的子类,但是这应该适用于您的简单测试。

+0

非常感谢你! –

相关问题