2
我在我的應用程序助手中有一個方法,但由於某種原因,當我運行我的rspec測試時沒有找到它。這裏的錯誤:ActionView中的未定義方法(rspec)
Failure/Error: helper.chart_series(user).should =~ /y: 100/
undefined method `ab_variant' for #<ActionView::Base:0x102b12d78>
# ./app/helpers/sidebar_helper.rb:17:in `chart_series'
# ./spec/helpers/sidebar_helper_spec.rb:35
我如何確保ab_variant(在應用程序助手內)可以通過我的rspec測試找到?