更新时间:2023-10-28 16:44:46
将此帮助文件放入spec / support /
put this helper file in spec/support/
和这一行spec_helper.rb
and this line spec_helper.rb
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }