这是我的测试结果当前输出到控制台的方式。请注意"运行选项...运行:..."和"完成..."都被列出两次。
Running via Spring preloader in process 8515
Run options: --seed 3074
# Running:
Run options: --seed 3074
# Running:
2018-02-14T14:46:14-06:00 - Changing from waiting_to_be_circulated to offered_to_user (event: offer)
..........
Finished in 1.059601s, 4.7188 runs/s, 4.7188 assertions/s.
5 runs, 5 assertions, 0 failures, 0 errors, 0 skips
Finished in 1.059780s, 4.7180 runs/s, 4.7180 assertions/s.
5 runs, 5 assertions, 0 failures, 0 errors, 0 skips
我知道在哪里可以查看可能导致输出重复的内容吗?我正在运行Rails 5.1.5和Ruby 2.4.1。如果您想了解更多信息,请随时告诉我,我很乐意提供!
这是我的test_helper.rb
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/autorun'
require 'minitest/reporters'
# Minitest::Reporters.use!(
# Minitest::Reporters::ProgressReporter.new(:color => true),
# ENV,
# Minitest.backtrace_filter
# )
# Integrate AASM gem's custom testing methods into minitest
require 'aasm/minitest'
require 'fileutils' # Used below in setting up CarrierWave
... <various CarrierWave settings also here> ...
class ActiveSupport::TestCase
include ApplicationHelper
include ActionDispatch::TestProcess
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
class ActionDispatch::IntegrationTest
# Log in as a particular user
def log_in_as(user, password: 'password', remember_me: '1')
post login_path, params: { session: { email: user.email,
password: password,
remember_me: remember_me } }
end
end