2017-05-04 68 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

非常感謝你! –

相關問題