Ruby on rails 将BestInPlace::TestHelpers与minitest一起使用
我试图在一个小型测试中使用这条线,该测试使用水豚、妖怪和幻影:Ruby on rails 将BestInPlace::TestHelpers与minitest一起使用,ruby-on-rails,minitest,best-in-place,Ruby On Rails,Minitest,Best In Place,我试图在一个小型测试中使用这条线,该测试使用水豚、妖怪和幻影: bip_select(@gs, :goal_id, Goal.first.name) 这是best_in_place提供的一个助手,用于模拟用户从字段中选择值。我在StackOverflow的其他地方读到了一些问题,其他使用RSpec的开发人员在他们的spec_helper.rb文件中添加了这一行: config.include BestInPlace::TestHelpers 我尝试将这一行添加到test_helpe
bip_select(@gs, :goal_id, Goal.first.name)
这是best_in_place提供的一个助手,用于模拟用户从字段中选择值。我在StackOverflow的其他地方读到了一些问题,其他使用RSpec的开发人员在他们的spec_helper.rb文件中添加了这一行:
config.include BestInPlace::TestHelpers
我尝试将这一行添加到test_helper.rb文件中,并尝试将其添加到相关测试中。但我还是发现了错误
NoMethodError: undefined method `bip_select' for #<GoalStudentsPoltergeistEditTest:0x00000006d85148>
提前感谢您提供的任何见解。要在您的集成测试中获得可用的方法定义,请编辑test_helper.rb,以包括引用最佳就位的其他行的行,以便上下文使用:
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'best_in_place/test_helpers'
# ...
class ActionDispatch::IntegrationTest
include BestInPlace::TestHelpers
end