我的应用程序助手中有一个方法,但由于某种原因,当我运行我的 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
如何确保我的 rspec 测试可以找到 ab_variant(在应用程序助手中)?