Method: RSpec::Expectations::Configuration#max_formatted_output_length=

Defined in:
lib/rspec/expectations/configuration.rb

#max_formatted_output_length=(length) ⇒ Object

Configures the maximum character length that RSpec will print while formatting an object. You can set length to nil to prevent RSpec from doing truncation.

Examples:

RSpec.configure do |rspec|
  rspec.expect_with :rspec do |c|
    c.max_formatted_output_length = 200
  end
end

Parameters:

  • length (Fixnum)

    the number of characters to limit the formatted output to.



70
71
72
# File 'lib/rspec/expectations/configuration.rb', line 70

def max_formatted_output_length=(length)
  RSpec::Support::ObjectFormatter.default_instance.max_formatted_output_length = length
end