🌿 Issues

  • Khi chạy test case compare 2 objects, trong trường hợp không match + object dài, output lỗi sẽ hiển thị rút gọn như dưới đây(mặc định sẽ hiển thị 200 kí tự cho từng object).

🌿 Solution

  • Set RSpec::Support::ObjectFormatter.default_instance.max_formatted_output_length = nil  để show đầy đủ thông tin của 2 objects.
  • Hoặc
RSpec.configure do |rspec|
  rspec.expect_with :rspec do |config|
    config.max_formatted_output_length = nil
  end
end

🌿 Refer