Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/rspec.rb')
-rw-r--r--spec/support/rspec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/support/rspec.rb b/spec/support/rspec.rb
index 4479e679d67..7f3aa55fb1d 100644
--- a/spec/support/rspec.rb
+++ b/spec/support/rspec.rb
@@ -20,10 +20,18 @@ RSpec.configure do |config|
config.example_status_persistence_file_path = ENV.fetch('RSPEC_LAST_RUN_RESULTS_FILE', './spec/examples.txt')
# Makes diffs show entire non-truncated values.
- config.before(:each, :unlimited_max_formatted_output_length) do
+ config.around(:each, :unlimited_max_formatted_output_length) do |example|
+ old_max_formatted_output_length = RSpec::Support::ObjectFormatter.default_instance.max_formatted_output_length
+
config.expect_with :rspec do |c|
c.max_formatted_output_length = nil
end
+
+ example.run
+
+ config.expect_with :rspec do |c|
+ c.max_formatted_output_length = old_max_formatted_output_length
+ end
end
unless ENV['CI']