From 810bb7ad356ba58474907191196857132001fb86 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 4 Jun 2022 21:08:30 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- spec/fast_spec_helper.rb | 7 +++++++ spec/scripts/lib/glfm/update_example_snapshots_spec.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/fast_spec_helper.rb b/spec/fast_spec_helper.rb index 6cbe97fb3f3..34ab48f67a8 100644 --- a/spec/fast_spec_helper.rb +++ b/spec/fast_spec_helper.rb @@ -35,4 +35,11 @@ RSpec.configure do |config| config.filter_run focus: true config.run_all_when_everything_filtered = true end + + # Makes diffs show entire non-truncated values. + config.before(:each, unlimited_max_formatted_output_length: true) do |_example| + config.expect_with :rspec do |c| + c.max_formatted_output_length = nil + end + end end diff --git a/spec/scripts/lib/glfm/update_example_snapshots_spec.rb b/spec/scripts/lib/glfm/update_example_snapshots_spec.rb index 3f77f105af1..82ed8563c3a 100644 --- a/spec/scripts/lib/glfm/update_example_snapshots_spec.rb +++ b/spec/scripts/lib/glfm/update_example_snapshots_spec.rb @@ -536,7 +536,7 @@ RSpec.describe Glfm::UpdateExampleSnapshots, '#process' do # avoid slower tests, because generating the static HTML is slow due to the need to invoke # the rails environment. We could have separate sections, but this would require an extra flag # to the `process` method to independently skip static vs. WYSIWYG, which is not worth the effort. - it 'writes the correct content' do + it 'writes the correct content', :unlimited_max_formatted_output_length do # expectation that skipping message is only output once per example expect(subject).to receive(:output).once.with(/reason.*skipping this example because it is very bad/i)