super_diff 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +65 -26
 - data/lib/super_diff/active_record/differs/active_record_relation.rb +1 -2
 - data/lib/super_diff/active_record/differs.rb +1 -1
 - data/lib/super_diff/active_record/object_inspection/inspection_tree_builders/active_record_model.rb +5 -13
 - data/lib/super_diff/active_record/object_inspection/inspection_tree_builders/active_record_relation.rb +1 -3
 - data/lib/super_diff/active_record/object_inspection/inspection_tree_builders.rb +2 -2
 - data/lib/super_diff/active_record/object_inspection.rb +1 -1
 - data/lib/super_diff/active_record/operation_tree_builders/active_record_model.rb +1 -2
 - data/lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb +1 -2
 - data/lib/super_diff/active_record/operation_tree_builders.rb +2 -2
 - data/lib/super_diff/active_record/operation_tree_flatteners.rb +1 -1
 - data/lib/super_diff/active_record/operation_trees.rb +1 -1
 - data/lib/super_diff/active_record.rb +7 -15
 - data/lib/super_diff/active_support/differs/hash_with_indifferent_access.rb +5 -6
 - data/lib/super_diff/active_support/differs.rb +1 -1
 - data/lib/super_diff/active_support/object_inspection/inspection_tree_builders/hash_with_indifferent_access.rb +3 -9
 - data/lib/super_diff/active_support/object_inspection/inspection_tree_builders.rb +1 -1
 - data/lib/super_diff/active_support/object_inspection.rb +1 -1
 - data/lib/super_diff/active_support/operation_tree_builders/hash_with_indifferent_access.rb +5 -6
 - data/lib/super_diff/active_support/operation_tree_builders.rb +1 -1
 - data/lib/super_diff/active_support/operation_tree_flatteners.rb +1 -1
 - data/lib/super_diff/active_support/operation_trees.rb +1 -1
 - data/lib/super_diff/active_support.rb +6 -11
 - data/lib/super_diff/colorized_document_extensions.rb +2 -4
 - data/lib/super_diff/configuration.rb +14 -8
 - data/lib/super_diff/csi/color.rb +4 -4
 - data/lib/super_diff/csi/colorized_document.rb +12 -16
 - data/lib/super_diff/csi/document.rb +8 -19
 - data/lib/super_diff/csi/eight_bit_color.rb +19 -19
 - data/lib/super_diff/csi/four_bit_color.rb +82 -31
 - data/lib/super_diff/csi/twenty_four_bit_color.rb +12 -11
 - data/lib/super_diff/csi/uncolorized_document.rb +2 -6
 - data/lib/super_diff/csi.rb +10 -14
 - data/lib/super_diff/diff_formatters/collection.rb +35 -41
 - data/lib/super_diff/differs/default_object.rb +1 -1
 - data/lib/super_diff/differs/defaults.rb +1 -1
 - data/lib/super_diff/differs/main.rb +2 -13
 - data/lib/super_diff/equality_matchers/array.rb +10 -12
 - data/lib/super_diff/equality_matchers/base.rb +1 -1
 - data/lib/super_diff/equality_matchers/default.rb +2 -4
 - data/lib/super_diff/equality_matchers/defaults.rb +1 -1
 - data/lib/super_diff/equality_matchers/hash.rb +10 -12
 - data/lib/super_diff/equality_matchers/multiline_string.rb +11 -13
 - data/lib/super_diff/equality_matchers/primitive.rb +10 -12
 - data/lib/super_diff/equality_matchers/singleline_string.rb +10 -12
 - data/lib/super_diff/equality_matchers.rb +1 -1
 - data/lib/super_diff/errors.rb +3 -3
 - data/lib/super_diff/gem_version.rb +3 -3
 - data/lib/super_diff/helpers.rb +10 -10
 - data/lib/super_diff/implementation_checks.rb +2 -2
 - data/lib/super_diff/line.rb +3 -3
 - data/lib/super_diff/object_inspection/inspection_tree.rb +46 -60
 - data/lib/super_diff/object_inspection/inspection_tree_builders/array.rb +2 -6
 - data/lib/super_diff/object_inspection/inspection_tree_builders/custom_object.rb +3 -9
 - data/lib/super_diff/object_inspection/inspection_tree_builders/default_object.rb +5 -14
 - data/lib/super_diff/object_inspection/inspection_tree_builders/defaults.rb +1 -1
 - data/lib/super_diff/object_inspection/inspection_tree_builders/hash.rb +4 -12
 - data/lib/super_diff/object_inspection/inspection_tree_builders/time_like.rb +6 -23
 - data/lib/super_diff/object_inspection/inspection_tree_builders.rb +9 -9
 - data/lib/super_diff/object_inspection/nodes/as_lines_when_rendering_to_lines.rb +8 -20
 - data/lib/super_diff/object_inspection/nodes/as_prefix_when_rendering_to_lines.rb +1 -5
 - data/lib/super_diff/object_inspection/nodes/as_prelude_when_rendering_to_lines.rb +1 -5
 - data/lib/super_diff/object_inspection/nodes/as_single_line.rb +3 -7
 - data/lib/super_diff/object_inspection/nodes/base.rb +9 -14
 - data/lib/super_diff/object_inspection/nodes/inspection.rb +26 -34
 - data/lib/super_diff/object_inspection/nodes/nesting.rb +1 -1
 - data/lib/super_diff/object_inspection/nodes/only_when.rb +2 -6
 - data/lib/super_diff/object_inspection/nodes/text.rb +1 -5
 - data/lib/super_diff/object_inspection/nodes/when_empty.rb +2 -6
 - data/lib/super_diff/object_inspection/nodes/when_non_empty.rb +2 -6
 - data/lib/super_diff/object_inspection/nodes/when_rendering_to_lines.rb +1 -1
 - data/lib/super_diff/object_inspection/nodes/when_rendering_to_string.rb +1 -5
 - data/lib/super_diff/object_inspection/nodes.rb +7 -7
 - data/lib/super_diff/object_inspection.rb +3 -3
 - data/lib/super_diff/operation_tree_builders/array.rb +12 -11
 - data/lib/super_diff/operation_tree_builders/base.rb +17 -15
 - data/lib/super_diff/operation_tree_builders/custom_object.rb +8 -6
 - data/lib/super_diff/operation_tree_builders/default_object.rb +29 -21
 - data/lib/super_diff/operation_tree_builders/hash.rb +23 -24
 - data/lib/super_diff/operation_tree_builders/main.rb +4 -11
 - data/lib/super_diff/operation_tree_builders/multiline_string.rb +3 -3
 - data/lib/super_diff/operation_tree_builders/time_like.rb +1 -11
 - data/lib/super_diff/operation_tree_builders.rb +1 -1
 - data/lib/super_diff/operation_tree_flatteners/base.rb +1 -5
 - data/lib/super_diff/operation_tree_flatteners/collection.rb +13 -16
 - data/lib/super_diff/operation_tree_flatteners/default_object.rb +1 -2
 - data/lib/super_diff/operation_tree_flatteners/hash.rb +2 -10
 - data/lib/super_diff/operation_tree_flatteners/multiline_string.rb +2 -1
 - data/lib/super_diff/operation_tree_flatteners.rb +3 -3
 - data/lib/super_diff/operation_trees/base.rb +3 -5
 - data/lib/super_diff/operation_trees/default_object.rb +1 -3
 - data/lib/super_diff/operations/binary_operation.rb +2 -2
 - data/lib/super_diff/operations/unary_operation.rb +1 -1
 - data/lib/super_diff/rails.rb +2 -1
 - data/lib/super_diff/recursion_guard.rb +5 -4
 - data/lib/super_diff/rspec/augmented_matcher.rb +4 -5
 - data/lib/super_diff/rspec/differ.rb +6 -13
 - data/lib/super_diff/rspec/differs/collection_containing_exactly.rb +3 -2
 - data/lib/super_diff/rspec/differs/collection_including.rb +1 -1
 - data/lib/super_diff/rspec/differs/hash_including.rb +1 -1
 - data/lib/super_diff/rspec/differs.rb +3 -3
 - data/lib/super_diff/rspec/matcher_text_builders/base.rb +13 -15
 - data/lib/super_diff/rspec/matcher_text_builders/be_predicate.rb +5 -7
 - data/lib/super_diff/rspec/matcher_text_builders/have_predicate.rb +3 -5
 - data/lib/super_diff/rspec/matcher_text_builders/raise_error.rb +1 -5
 - data/lib/super_diff/rspec/matcher_text_builders/respond_to.rb +2 -6
 - data/lib/super_diff/rspec/matcher_text_builders.rb +5 -8
 - data/lib/super_diff/rspec/matcher_text_template.rb +13 -16
 - data/lib/super_diff/rspec/monkey_patches.rb +122 -116
 - data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/collection_including.rb +8 -6
 - data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/double.rb +11 -16
 - data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/hash_including.rb +2 -1
 - data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/instance_of.rb +8 -6
 - data/lib/super_diff/rspec/object_inspection/inspection_tree_builders/kind_of.rb +8 -6
 - data/lib/super_diff/rspec/object_inspection/inspection_tree_builders.rb +9 -9
 - data/lib/super_diff/rspec/object_inspection.rb +1 -1
 - data/lib/super_diff/rspec/operation_tree_builders/collection_containing_exactly.rb +11 -10
 - data/lib/super_diff/rspec/operation_tree_builders/collection_including.rb +7 -6
 - data/lib/super_diff/rspec/operation_tree_builders/hash_including.rb +11 -10
 - data/lib/super_diff/rspec/operation_tree_builders/object_having_attributes.rb +22 -17
 - data/lib/super_diff/rspec/operation_tree_builders.rb +4 -4
 - data/lib/super_diff/rspec.rb +11 -13
 - data/lib/super_diff/tiered_lines_elider.rb +87 -115
 - data/lib/super_diff/tiered_lines_formatter.rb +5 -9
 - data/lib/super_diff/version.rb +1 -1
 - data/lib/super_diff.rb +4 -9
 - data/spec/examples.txt +493 -485
 - data/spec/integration/rails/active_record_spec.rb +3 -1
 - data/spec/integration/rails/engines_spec.rb +20 -0
 - data/spec/integration/rails/hash_with_indifferent_access_spec.rb +3 -1
 - data/spec/integration/rspec/be_falsey_matcher_spec.rb +40 -35
 - data/spec/integration/rspec/be_matcher_spec.rb +360 -320
 - data/spec/integration/rspec/be_nil_matcher_spec.rb +38 -34
 - data/spec/integration/rspec/be_predicate_matcher_spec.rb +376 -359
 - data/spec/integration/rspec/be_truthy_matcher_spec.rb +38 -33
 - data/spec/integration/rspec/contain_exactly_matcher_spec.rb +242 -239
 - data/spec/integration/rspec/eq_matcher_spec.rb +595 -557
 - data/spec/integration/rspec/have_attributes_matcher_spec.rb +294 -286
 - data/spec/integration/rspec/have_predicate_matcher_spec.rb +291 -297
 - data/spec/integration/rspec/include_matcher_spec.rb +317 -215
 - data/spec/integration/rspec/match_array_matcher_spec.rb +276 -273
 - data/spec/integration/rspec/match_matcher_spec.rb +847 -834
 - data/spec/integration/rspec/raise_error_matcher_spec.rb +468 -453
 - data/spec/integration/rspec/respond_to_matcher_spec.rb +702 -697
 - data/spec/integration/rspec/third_party_matcher_spec.rb +142 -138
 - data/spec/integration/rspec/unhandled_errors_spec.rb +88 -84
 - data/spec/spec_helper.rb +17 -20
 - data/spec/support/command_runner.rb +34 -57
 - data/spec/support/integration/helpers.rb +35 -28
 - data/spec/support/integration/matchers/produce_output_when_run_matcher.rb +28 -23
 - data/spec/support/integration/test_programs/base.rb +12 -17
 - data/spec/support/integration/test_programs/plain.rb +6 -0
 - data/spec/support/integration/test_programs/rspec_active_record.rb +4 -1
 - data/spec/support/integration/test_programs/rspec_active_support.rb +4 -1
 - data/spec/support/integration/test_programs/rspec_rails.rb +4 -1
 - data/spec/support/integration/test_programs/rspec_rails_engine.rb +30 -0
 - data/spec/support/models/active_record/person.rb +6 -4
 - data/spec/support/models/active_record/shipping_address.rb +9 -10
 - data/spec/support/models/customer.rb +2 -4
 - data/spec/support/models/player.rb +3 -6
 - data/spec/support/models/shipping_address.rb +4 -13
 - data/spec/support/shared_examples/active_record.rb +232 -214
 - data/spec/support/shared_examples/active_support.rb +53 -51
 - data/spec/support/shared_examples/elided_diffs.rb +405 -381
 - data/spec/support/shared_examples/hash_with_indifferent_access.rb +424 -388
 - data/spec/support/shared_examples/key.rb +123 -0
 - data/spec/support/unit/helpers.rb +1 -3
 - data/spec/support/unit/matchers/match_output.rb +12 -13
 - data/spec/unit/active_record/object_inspection_spec.rb +222 -206
 - data/spec/unit/equality_matchers/main_spec.rb +1049 -984
 - data/spec/unit/helpers_spec.rb +14 -21
 - data/spec/unit/operation_tree_flatteners/array_spec.rb +557 -524
 - data/spec/unit/operation_tree_flatteners/custom_object_spec.rb +619 -601
 - data/spec/unit/operation_tree_flatteners/default_object_spec.rb +619 -621
 - data/spec/unit/operation_tree_flatteners/hash_spec.rb +595 -556
 - data/spec/unit/operation_tree_flatteners/multiline_string_spec.rb +102 -92
 - data/spec/unit/rspec/matchers/be_compared_to_spec.rb +3 -3
 - data/spec/unit/rspec/matchers/be_predicate_spec.rb +3 -3
 - data/spec/unit/rspec/matchers/contain_exactly_spec.rb +1 -1
 - data/spec/unit/rspec/matchers/have_attributes_spec.rb +1 -1
 - data/spec/unit/rspec/matchers/have_predicate_spec.rb +2 -2
 - data/spec/unit/rspec/matchers/include_spec.rb +2 -2
 - data/spec/unit/rspec/matchers/match_array_spec.rb +2 -2
 - data/spec/unit/rspec/matchers/raise_error_spec.rb +5 -5
 - data/spec/unit/rspec/matchers/respond_to_spec.rb +23 -16
 - data/spec/unit/rspec/object_inspection_spec.rb +349 -324
 - data/spec/unit/super_diff_spec.rb +1542 -1449
 - data/spec/unit/tiered_lines_elider_spec.rb +3508 -3536
 - data/spec/unit/tiered_lines_formatter_spec.rb +54 -116
 - data/super_diff.gemspec +13 -12
 - metadata +73 -73
 - data/spec/tmp/warnings_logger/all_warnings.txt +0 -2
 
| 
         @@ -36,51 +36,55 @@ shared_examples_for "a matcher that supports elided diffs" do 
     | 
|
| 
       36 
36 
     | 
    
         
             
                        ]
         
     | 
| 
       37 
37 
     | 
    
         
             
                        expect(actual).to #{matcher}(expected)
         
     | 
| 
       38 
38 
     | 
    
         
             
                      TEST
         
     | 
| 
       39 
     | 
    
         
            -
                      program = 
     | 
| 
       40 
     | 
    
         
            -
                         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                           
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
      
 39 
     | 
    
         
            +
                      program =
         
     | 
| 
      
 40 
     | 
    
         
            +
                        make_plain_test_program(
         
     | 
| 
      
 41 
     | 
    
         
            +
                          snippet,
         
     | 
| 
      
 42 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 43 
     | 
    
         
            +
                          configuration: {
         
     | 
| 
      
 44 
     | 
    
         
            +
                            diff_elision_enabled: true,
         
     | 
| 
      
 45 
     | 
    
         
            +
                            diff_elision_maximum: 3
         
     | 
| 
      
 46 
     | 
    
         
            +
                          }
         
     | 
| 
      
 47 
     | 
    
         
            +
                        )
         
     | 
| 
       47 
48 
     | 
    
         | 
| 
       48 
     | 
    
         
            -
                      expected_output = 
     | 
| 
       49 
     | 
    
         
            -
                         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                           
     | 
| 
       54 
     | 
    
         
            -
                             
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
      
 49 
     | 
    
         
            +
                      expected_output =
         
     | 
| 
      
 50 
     | 
    
         
            +
                        build_expected_output(
         
     | 
| 
      
 51 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 52 
     | 
    
         
            +
                          snippet: %|expect(actual).to #{matcher}(expected)|,
         
     | 
| 
      
 53 
     | 
    
         
            +
                          newline_before_expectation: true,
         
     | 
| 
      
 54 
     | 
    
         
            +
                          expectation:
         
     | 
| 
      
 55 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 56 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 57 
     | 
    
         
            +
                                plain "Expected "
         
     | 
| 
      
 58 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 59 
     | 
    
         
            +
                                actual %|["Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia"]|
         
     | 
| 
      
 60 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 61 
     | 
    
         
            +
                              end
         
     | 
| 
       59 
62 
     | 
    
         | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
      
 63 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 64 
     | 
    
         
            +
                                plain "   to eq "
         
     | 
| 
      
 65 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 66 
     | 
    
         
            +
                                expected %|["Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia"]|
         
     | 
| 
      
 67 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 68 
     | 
    
         
            +
                              end
         
     | 
| 
      
 69 
     | 
    
         
            +
                            end,
         
     | 
| 
      
 70 
     | 
    
         
            +
                          diff:
         
     | 
| 
      
 71 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 72 
     | 
    
         
            +
                              plain_line "  ["
         
     | 
| 
      
 73 
     | 
    
         
            +
                              elision_marker_line "    # ..."
         
     | 
| 
      
 74 
     | 
    
         
            +
                              plain_line %|    "American Samoa",|
         
     | 
| 
      
 75 
     | 
    
         
            +
                              plain_line %|    "Andorra",|
         
     | 
| 
      
 76 
     | 
    
         
            +
                              expected_line %|-   "Angola",|
         
     | 
| 
      
 77 
     | 
    
         
            +
                              actual_line %|+   "Anguilla",|
         
     | 
| 
      
 78 
     | 
    
         
            +
                              plain_line %|    "Antarctica",|
         
     | 
| 
      
 79 
     | 
    
         
            +
                              plain_line %|    "Antigua And Barbuda",|
         
     | 
| 
      
 80 
     | 
    
         
            +
                              elision_marker_line "    # ..."
         
     | 
| 
      
 81 
     | 
    
         
            +
                              plain_line "  ]"
         
     | 
| 
      
 82 
     | 
    
         
            +
                            end
         
     | 
| 
      
 83 
     | 
    
         
            +
                        )
         
     | 
| 
       80 
84 
     | 
    
         | 
| 
       81 
     | 
    
         
            -
                      expect(program).
         
     | 
| 
       82 
     | 
    
         
            -
                         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
      
 85 
     | 
    
         
            +
                      expect(program).to produce_output_when_run(expected_output).in_color(
         
     | 
| 
      
 86 
     | 
    
         
            +
                        color_enabled
         
     | 
| 
      
 87 
     | 
    
         
            +
                      )
         
     | 
| 
       84 
88 
     | 
    
         
             
                    end
         
     | 
| 
       85 
89 
     | 
    
         
             
                  end
         
     | 
| 
       86 
90 
     | 
    
         
             
                end
         
     | 
| 
         @@ -121,57 +125,61 @@ shared_examples_for "a matcher that supports elided diffs" do 
     | 
|
| 
       121 
125 
     | 
    
         
             
                        ]
         
     | 
| 
       122 
126 
     | 
    
         
             
                        expect(actual).to #{matcher}(expected)
         
     | 
| 
       123 
127 
     | 
    
         
             
                      TEST
         
     | 
| 
       124 
     | 
    
         
            -
                      program = 
     | 
| 
       125 
     | 
    
         
            -
                         
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
                           
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
      
 128 
     | 
    
         
            +
                      program =
         
     | 
| 
      
 129 
     | 
    
         
            +
                        make_plain_test_program(
         
     | 
| 
      
 130 
     | 
    
         
            +
                          snippet,
         
     | 
| 
      
 131 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 132 
     | 
    
         
            +
                          configuration: {
         
     | 
| 
      
 133 
     | 
    
         
            +
                            diff_elision_enabled: false,
         
     | 
| 
      
 134 
     | 
    
         
            +
                            diff_elision_maximum: 3
         
     | 
| 
      
 135 
     | 
    
         
            +
                          }
         
     | 
| 
      
 136 
     | 
    
         
            +
                        )
         
     | 
| 
       132 
137 
     | 
    
         | 
| 
       133 
     | 
    
         
            -
                      expected_output = 
     | 
| 
       134 
     | 
    
         
            -
                         
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
                           
     | 
| 
       139 
     | 
    
         
            -
                             
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
             
     | 
| 
      
 138 
     | 
    
         
            +
                      expected_output =
         
     | 
| 
      
 139 
     | 
    
         
            +
                        build_expected_output(
         
     | 
| 
      
 140 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 141 
     | 
    
         
            +
                          snippet: %|expect(actual).to #{matcher}(expected)|,
         
     | 
| 
      
 142 
     | 
    
         
            +
                          newline_before_expectation: true,
         
     | 
| 
      
 143 
     | 
    
         
            +
                          expectation:
         
     | 
| 
      
 144 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 145 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 146 
     | 
    
         
            +
                                plain "Expected "
         
     | 
| 
      
 147 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 148 
     | 
    
         
            +
                                actual %|["Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia"]|
         
     | 
| 
      
 149 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 150 
     | 
    
         
            +
                              end
         
     | 
| 
       144 
151 
     | 
    
         | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
             
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
       150 
     | 
    
         
            -
             
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
       154 
     | 
    
         
            -
             
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
             
     | 
| 
       158 
     | 
    
         
            -
             
     | 
| 
       159 
     | 
    
         
            -
             
     | 
| 
       160 
     | 
    
         
            -
             
     | 
| 
       161 
     | 
    
         
            -
             
     | 
| 
       162 
     | 
    
         
            -
             
     | 
| 
       163 
     | 
    
         
            -
             
     | 
| 
       164 
     | 
    
         
            -
             
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
             
     | 
| 
       167 
     | 
    
         
            -
             
     | 
| 
       168 
     | 
    
         
            -
             
     | 
| 
       169 
     | 
    
         
            -
             
     | 
| 
       170 
     | 
    
         
            -
             
     | 
| 
      
 152 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 153 
     | 
    
         
            +
                                plain "   to eq "
         
     | 
| 
      
 154 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 155 
     | 
    
         
            +
                                expected %|["Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia"]|
         
     | 
| 
      
 156 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 157 
     | 
    
         
            +
                              end
         
     | 
| 
      
 158 
     | 
    
         
            +
                            end,
         
     | 
| 
      
 159 
     | 
    
         
            +
                          diff:
         
     | 
| 
      
 160 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 161 
     | 
    
         
            +
                              plain_line "  ["
         
     | 
| 
      
 162 
     | 
    
         
            +
                              plain_line %|    "Afghanistan",|
         
     | 
| 
      
 163 
     | 
    
         
            +
                              plain_line %|    "Aland Islands",|
         
     | 
| 
      
 164 
     | 
    
         
            +
                              plain_line %|    "Albania",|
         
     | 
| 
      
 165 
     | 
    
         
            +
                              plain_line %|    "Algeria",|
         
     | 
| 
      
 166 
     | 
    
         
            +
                              plain_line %|    "American Samoa",|
         
     | 
| 
      
 167 
     | 
    
         
            +
                              plain_line %|    "Andorra",|
         
     | 
| 
      
 168 
     | 
    
         
            +
                              expected_line %|-   "Angola",|
         
     | 
| 
      
 169 
     | 
    
         
            +
                              actual_line %|+   "Anguilla",|
         
     | 
| 
      
 170 
     | 
    
         
            +
                              plain_line %|    "Antarctica",|
         
     | 
| 
      
 171 
     | 
    
         
            +
                              plain_line %|    "Antigua And Barbuda",|
         
     | 
| 
      
 172 
     | 
    
         
            +
                              plain_line %|    "Argentina",|
         
     | 
| 
      
 173 
     | 
    
         
            +
                              plain_line %|    "Armenia",|
         
     | 
| 
      
 174 
     | 
    
         
            +
                              plain_line %|    "Aruba",|
         
     | 
| 
      
 175 
     | 
    
         
            +
                              plain_line %|    "Australia"|
         
     | 
| 
      
 176 
     | 
    
         
            +
                              plain_line "  ]"
         
     | 
| 
      
 177 
     | 
    
         
            +
                            end
         
     | 
| 
      
 178 
     | 
    
         
            +
                        )
         
     | 
| 
       171 
179 
     | 
    
         | 
| 
       172 
     | 
    
         
            -
                      expect(program).
         
     | 
| 
       173 
     | 
    
         
            -
                         
     | 
| 
       174 
     | 
    
         
            -
             
     | 
| 
      
 180 
     | 
    
         
            +
                      expect(program).to produce_output_when_run(expected_output).in_color(
         
     | 
| 
      
 181 
     | 
    
         
            +
                        color_enabled
         
     | 
| 
      
 182 
     | 
    
         
            +
                      )
         
     | 
| 
       175 
183 
     | 
    
         
             
                    end
         
     | 
| 
       176 
184 
     | 
    
         
             
                  end
         
     | 
| 
       177 
185 
     | 
    
         
             
                end
         
     | 
| 
         @@ -216,50 +224,54 @@ shared_examples_for "a matcher that supports elided diffs" do 
     | 
|
| 
       216 
224 
     | 
    
         
             
                        ]
         
     | 
| 
       217 
225 
     | 
    
         
             
                        expect(actual).to #{matcher}(expected)
         
     | 
| 
       218 
226 
     | 
    
         
             
                      TEST
         
     | 
| 
       219 
     | 
    
         
            -
                      program = 
     | 
| 
       220 
     | 
    
         
            -
                         
     | 
| 
       221 
     | 
    
         
            -
             
     | 
| 
       222 
     | 
    
         
            -
             
     | 
| 
       223 
     | 
    
         
            -
                           
     | 
| 
       224 
     | 
    
         
            -
             
     | 
| 
       225 
     | 
    
         
            -
             
     | 
| 
       226 
     | 
    
         
            -
             
     | 
| 
      
 227 
     | 
    
         
            +
                      program =
         
     | 
| 
      
 228 
     | 
    
         
            +
                        make_plain_test_program(
         
     | 
| 
      
 229 
     | 
    
         
            +
                          snippet,
         
     | 
| 
      
 230 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 231 
     | 
    
         
            +
                          configuration: {
         
     | 
| 
      
 232 
     | 
    
         
            +
                            diff_elision_enabled: true,
         
     | 
| 
      
 233 
     | 
    
         
            +
                            diff_elision_maximum: 3
         
     | 
| 
      
 234 
     | 
    
         
            +
                          }
         
     | 
| 
      
 235 
     | 
    
         
            +
                        )
         
     | 
| 
       227 
236 
     | 
    
         | 
| 
       228 
     | 
    
         
            -
                      expected_output = 
     | 
| 
       229 
     | 
    
         
            -
                         
     | 
| 
       230 
     | 
    
         
            -
             
     | 
| 
       231 
     | 
    
         
            -
             
     | 
| 
       232 
     | 
    
         
            -
             
     | 
| 
       233 
     | 
    
         
            -
                           
     | 
| 
       234 
     | 
    
         
            -
                             
     | 
| 
       235 
     | 
    
         
            -
             
     | 
| 
       236 
     | 
    
         
            -
             
     | 
| 
       237 
     | 
    
         
            -
             
     | 
| 
       238 
     | 
    
         
            -
             
     | 
| 
      
 237 
     | 
    
         
            +
                      expected_output =
         
     | 
| 
      
 238 
     | 
    
         
            +
                        build_expected_output(
         
     | 
| 
      
 239 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 240 
     | 
    
         
            +
                          snippet: %|expect(actual).to #{matcher}(expected)|,
         
     | 
| 
      
 241 
     | 
    
         
            +
                          newline_before_expectation: true,
         
     | 
| 
      
 242 
     | 
    
         
            +
                          expectation:
         
     | 
| 
      
 243 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 244 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 245 
     | 
    
         
            +
                                plain "Expected "
         
     | 
| 
      
 246 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 247 
     | 
    
         
            +
                                actual %|["Zambia", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Zimbabwe"]|
         
     | 
| 
      
 248 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 249 
     | 
    
         
            +
                              end
         
     | 
| 
       239 
250 
     | 
    
         | 
| 
       240 
     | 
    
         
            -
             
     | 
| 
       241 
     | 
    
         
            -
             
     | 
| 
       242 
     | 
    
         
            -
             
     | 
| 
       243 
     | 
    
         
            -
             
     | 
| 
       244 
     | 
    
         
            -
             
     | 
| 
       245 
     | 
    
         
            -
             
     | 
| 
       246 
     | 
    
         
            -
             
     | 
| 
       247 
     | 
    
         
            -
             
     | 
| 
       248 
     | 
    
         
            -
             
     | 
| 
       249 
     | 
    
         
            -
             
     | 
| 
       250 
     | 
    
         
            -
             
     | 
| 
       251 
     | 
    
         
            -
             
     | 
| 
       252 
     | 
    
         
            -
             
     | 
| 
       253 
     | 
    
         
            -
             
     | 
| 
       254 
     | 
    
         
            -
             
     | 
| 
       255 
     | 
    
         
            -
             
     | 
| 
       256 
     | 
    
         
            -
             
     | 
| 
       257 
     | 
    
         
            -
             
     | 
| 
       258 
     | 
    
         
            -
             
     | 
| 
      
 251 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 252 
     | 
    
         
            +
                                plain "   to eq "
         
     | 
| 
      
 253 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 254 
     | 
    
         
            +
                                expected %|["Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia"]|
         
     | 
| 
      
 255 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 256 
     | 
    
         
            +
                              end
         
     | 
| 
      
 257 
     | 
    
         
            +
                            end,
         
     | 
| 
      
 258 
     | 
    
         
            +
                          diff:
         
     | 
| 
      
 259 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 260 
     | 
    
         
            +
                              plain_line "  ["
         
     | 
| 
      
 261 
     | 
    
         
            +
                              expected_line %|-   "Afghanistan",|
         
     | 
| 
      
 262 
     | 
    
         
            +
                              actual_line %|+   "Zambia",|
         
     | 
| 
      
 263 
     | 
    
         
            +
                              plain_line %|    "Aland Islands",|
         
     | 
| 
      
 264 
     | 
    
         
            +
                              elision_marker_line "    # ..."
         
     | 
| 
      
 265 
     | 
    
         
            +
                              plain_line %|    "Aruba",|
         
     | 
| 
      
 266 
     | 
    
         
            +
                              expected_line %|-   "Australia"|
         
     | 
| 
      
 267 
     | 
    
         
            +
                              actual_line %|+   "Zimbabwe"|
         
     | 
| 
      
 268 
     | 
    
         
            +
                              plain_line "  ]"
         
     | 
| 
      
 269 
     | 
    
         
            +
                            end
         
     | 
| 
      
 270 
     | 
    
         
            +
                        )
         
     | 
| 
       259 
271 
     | 
    
         | 
| 
       260 
     | 
    
         
            -
                      expect(program).
         
     | 
| 
       261 
     | 
    
         
            -
                         
     | 
| 
       262 
     | 
    
         
            -
             
     | 
| 
      
 272 
     | 
    
         
            +
                      expect(program).to produce_output_when_run(expected_output).in_color(
         
     | 
| 
      
 273 
     | 
    
         
            +
                        color_enabled
         
     | 
| 
      
 274 
     | 
    
         
            +
                      )
         
     | 
| 
       263 
275 
     | 
    
         
             
                    end
         
     | 
| 
       264 
276 
     | 
    
         
             
                  end
         
     | 
| 
       265 
277 
     | 
    
         
             
                end
         
     | 
| 
         @@ -302,59 +314,63 @@ shared_examples_for "a matcher that supports elided diffs" do 
     | 
|
| 
       302 
314 
     | 
    
         
             
                        ]
         
     | 
| 
       303 
315 
     | 
    
         
             
                        expect(actual).to #{matcher}(expected)
         
     | 
| 
       304 
316 
     | 
    
         
             
                      TEST
         
     | 
| 
       305 
     | 
    
         
            -
                      program = 
     | 
| 
       306 
     | 
    
         
            -
                         
     | 
| 
       307 
     | 
    
         
            -
             
     | 
| 
       308 
     | 
    
         
            -
             
     | 
| 
       309 
     | 
    
         
            -
                           
     | 
| 
       310 
     | 
    
         
            -
             
     | 
| 
       311 
     | 
    
         
            -
             
     | 
| 
       312 
     | 
    
         
            -
             
     | 
| 
      
 317 
     | 
    
         
            +
                      program =
         
     | 
| 
      
 318 
     | 
    
         
            +
                        make_plain_test_program(
         
     | 
| 
      
 319 
     | 
    
         
            +
                          snippet,
         
     | 
| 
      
 320 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 321 
     | 
    
         
            +
                          configuration: {
         
     | 
| 
      
 322 
     | 
    
         
            +
                            diff_elision_enabled: false,
         
     | 
| 
      
 323 
     | 
    
         
            +
                            diff_elision_maximum: 3
         
     | 
| 
      
 324 
     | 
    
         
            +
                          }
         
     | 
| 
      
 325 
     | 
    
         
            +
                        )
         
     | 
| 
       313 
326 
     | 
    
         | 
| 
       314 
     | 
    
         
            -
                      expected_output = 
     | 
| 
       315 
     | 
    
         
            -
                         
     | 
| 
       316 
     | 
    
         
            -
             
     | 
| 
       317 
     | 
    
         
            -
             
     | 
| 
       318 
     | 
    
         
            -
             
     | 
| 
       319 
     | 
    
         
            -
                           
     | 
| 
       320 
     | 
    
         
            -
                             
     | 
| 
       321 
     | 
    
         
            -
             
     | 
| 
       322 
     | 
    
         
            -
             
     | 
| 
       323 
     | 
    
         
            -
             
     | 
| 
       324 
     | 
    
         
            -
             
     | 
| 
      
 327 
     | 
    
         
            +
                      expected_output =
         
     | 
| 
      
 328 
     | 
    
         
            +
                        build_expected_output(
         
     | 
| 
      
 329 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 330 
     | 
    
         
            +
                          snippet: %|expect(actual).to #{matcher}(expected)|,
         
     | 
| 
      
 331 
     | 
    
         
            +
                          newline_before_expectation: true,
         
     | 
| 
      
 332 
     | 
    
         
            +
                          expectation:
         
     | 
| 
      
 333 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 334 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 335 
     | 
    
         
            +
                                plain "Expected "
         
     | 
| 
      
 336 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 337 
     | 
    
         
            +
                                actual %|["Zambia", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Zimbabwe"]|
         
     | 
| 
      
 338 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 339 
     | 
    
         
            +
                              end
         
     | 
| 
       325 
340 
     | 
    
         | 
| 
       326 
     | 
    
         
            -
             
     | 
| 
       327 
     | 
    
         
            -
             
     | 
| 
       328 
     | 
    
         
            -
             
     | 
| 
       329 
     | 
    
         
            -
             
     | 
| 
       330 
     | 
    
         
            -
             
     | 
| 
       331 
     | 
    
         
            -
             
     | 
| 
       332 
     | 
    
         
            -
             
     | 
| 
       333 
     | 
    
         
            -
             
     | 
| 
       334 
     | 
    
         
            -
             
     | 
| 
       335 
     | 
    
         
            -
             
     | 
| 
       336 
     | 
    
         
            -
             
     | 
| 
       337 
     | 
    
         
            -
             
     | 
| 
       338 
     | 
    
         
            -
             
     | 
| 
       339 
     | 
    
         
            -
             
     | 
| 
       340 
     | 
    
         
            -
             
     | 
| 
       341 
     | 
    
         
            -
             
     | 
| 
       342 
     | 
    
         
            -
             
     | 
| 
       343 
     | 
    
         
            -
             
     | 
| 
       344 
     | 
    
         
            -
             
     | 
| 
       345 
     | 
    
         
            -
             
     | 
| 
       346 
     | 
    
         
            -
             
     | 
| 
       347 
     | 
    
         
            -
             
     | 
| 
       348 
     | 
    
         
            -
             
     | 
| 
       349 
     | 
    
         
            -
             
     | 
| 
       350 
     | 
    
         
            -
             
     | 
| 
       351 
     | 
    
         
            -
             
     | 
| 
       352 
     | 
    
         
            -
             
     | 
| 
       353 
     | 
    
         
            -
             
     | 
| 
      
 341 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 342 
     | 
    
         
            +
                                plain "   to eq "
         
     | 
| 
      
 343 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 344 
     | 
    
         
            +
                                expected %|["Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia"]|
         
     | 
| 
      
 345 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 346 
     | 
    
         
            +
                              end
         
     | 
| 
      
 347 
     | 
    
         
            +
                            end,
         
     | 
| 
      
 348 
     | 
    
         
            +
                          diff:
         
     | 
| 
      
 349 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 350 
     | 
    
         
            +
                              plain_line "  ["
         
     | 
| 
      
 351 
     | 
    
         
            +
                              expected_line %|-   "Afghanistan",|
         
     | 
| 
      
 352 
     | 
    
         
            +
                              actual_line %|+   "Zambia",|
         
     | 
| 
      
 353 
     | 
    
         
            +
                              plain_line %|    "Aland Islands",|
         
     | 
| 
      
 354 
     | 
    
         
            +
                              plain_line %|    "Albania",|
         
     | 
| 
      
 355 
     | 
    
         
            +
                              plain_line %|    "Algeria",|
         
     | 
| 
      
 356 
     | 
    
         
            +
                              plain_line %|    "American Samoa",|
         
     | 
| 
      
 357 
     | 
    
         
            +
                              plain_line %|    "Andorra",|
         
     | 
| 
      
 358 
     | 
    
         
            +
                              plain_line %|    "Angola",|
         
     | 
| 
      
 359 
     | 
    
         
            +
                              plain_line %|    "Anguilla",|
         
     | 
| 
      
 360 
     | 
    
         
            +
                              plain_line %|    "Antarctica",|
         
     | 
| 
      
 361 
     | 
    
         
            +
                              plain_line %|    "Antigua And Barbuda",|
         
     | 
| 
      
 362 
     | 
    
         
            +
                              plain_line %|    "Argentina",|
         
     | 
| 
      
 363 
     | 
    
         
            +
                              plain_line %|    "Armenia",|
         
     | 
| 
      
 364 
     | 
    
         
            +
                              plain_line %|    "Aruba",|
         
     | 
| 
      
 365 
     | 
    
         
            +
                              expected_line %|-   "Australia"|
         
     | 
| 
      
 366 
     | 
    
         
            +
                              actual_line %|+   "Zimbabwe"|
         
     | 
| 
      
 367 
     | 
    
         
            +
                              plain_line "  ]"
         
     | 
| 
      
 368 
     | 
    
         
            +
                            end
         
     | 
| 
      
 369 
     | 
    
         
            +
                        )
         
     | 
| 
       354 
370 
     | 
    
         | 
| 
       355 
     | 
    
         
            -
                      expect(program).
         
     | 
| 
       356 
     | 
    
         
            -
                         
     | 
| 
       357 
     | 
    
         
            -
             
     | 
| 
      
 371 
     | 
    
         
            +
                      expect(program).to produce_output_when_run(expected_output).in_color(
         
     | 
| 
      
 372 
     | 
    
         
            +
                        color_enabled
         
     | 
| 
      
 373 
     | 
    
         
            +
                      )
         
     | 
| 
       358 
374 
     | 
    
         
             
                    end
         
     | 
| 
       359 
375 
     | 
    
         
             
                  end
         
     | 
| 
       360 
376 
     | 
    
         
             
                end
         
     | 
| 
         @@ -530,92 +546,96 @@ shared_examples_for "a matcher that supports elided diffs" do 
     | 
|
| 
       530 
546 
     | 
    
         
             
                        ]
         
     | 
| 
       531 
547 
     | 
    
         
             
                        expect(actual).to #{matcher}(expected)
         
     | 
| 
       532 
548 
     | 
    
         
             
                      TEST
         
     | 
| 
       533 
     | 
    
         
            -
                      program = 
     | 
| 
       534 
     | 
    
         
            -
                         
     | 
| 
       535 
     | 
    
         
            -
             
     | 
| 
       536 
     | 
    
         
            -
             
     | 
| 
       537 
     | 
    
         
            -
                           
     | 
| 
       538 
     | 
    
         
            -
             
     | 
| 
       539 
     | 
    
         
            -
             
     | 
| 
       540 
     | 
    
         
            -
             
     | 
| 
      
 549 
     | 
    
         
            +
                      program =
         
     | 
| 
      
 550 
     | 
    
         
            +
                        make_plain_test_program(
         
     | 
| 
      
 551 
     | 
    
         
            +
                          snippet,
         
     | 
| 
      
 552 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 553 
     | 
    
         
            +
                          configuration: {
         
     | 
| 
      
 554 
     | 
    
         
            +
                            diff_elision_enabled: true,
         
     | 
| 
      
 555 
     | 
    
         
            +
                            diff_elision_maximum: 10
         
     | 
| 
      
 556 
     | 
    
         
            +
                          }
         
     | 
| 
      
 557 
     | 
    
         
            +
                        )
         
     | 
| 
       541 
558 
     | 
    
         | 
| 
       542 
     | 
    
         
            -
                      expected_output = 
     | 
| 
       543 
     | 
    
         
            -
                         
     | 
| 
       544 
     | 
    
         
            -
             
     | 
| 
       545 
     | 
    
         
            -
             
     | 
| 
       546 
     | 
    
         
            -
             
     | 
| 
       547 
     | 
    
         
            -
                           
     | 
| 
       548 
     | 
    
         
            -
                             
     | 
| 
       549 
     | 
    
         
            -
             
     | 
| 
       550 
     | 
    
         
            -
             
     | 
| 
       551 
     | 
    
         
            -
             
     | 
| 
       552 
     | 
    
         
            -
             
     | 
| 
      
 559 
     | 
    
         
            +
                      expected_output =
         
     | 
| 
      
 560 
     | 
    
         
            +
                        build_expected_output(
         
     | 
| 
      
 561 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 562 
     | 
    
         
            +
                          snippet: %|expect(actual).to #{matcher}(expected)|,
         
     | 
| 
      
 563 
     | 
    
         
            +
                          newline_before_expectation: true,
         
     | 
| 
      
 564 
     | 
    
         
            +
                          expectation:
         
     | 
| 
      
 565 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 566 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 567 
     | 
    
         
            +
                                plain "Expected "
         
     | 
| 
      
 568 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 569 
     | 
    
         
            +
                                actual %<[{ user_id: "18949452", user: { id: 18949452, name: "Financial Times", screen_name: "FT", location: "London", url: "http://t.co/dnhLQpd9BY", entities: { url: { urls: [{ url: "http://t.co/dnhLQpd9BY", expanded_url: "http://www.ft.com/", display_url: "ft.com", indices: [0, 22] }] }, description: { urls: [{ url: "https://t.co/5BsmLs9y1Z", display_url: "FT.com", indices: [65, 88] }] } }, protected: false, listed_count: 37009, created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, utc_offset: nil, time_zone: nil, geo_enabled: false, verified: true, statuses_count: 273860, media_count: 51044, contributors_enabled: false, is_translator: false, is_translation_enabled: false, profile_background_color: "FFF1E0", profile_background_image_url: "http://abs.twimg.com/images/themes/theme1/bg.png", profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592", profile_image_extensions: { mediaStats: { r: { missing: nil }, ttl: -1 } }, profile_banner_extensions: {}, blocking: false, blocked_by: false, want_retweets: false, advertiser_account_type: "none", profile_interstitial_type: "", business_profile_state: "none", translator_type: "none", followed_by: false, ext: { highlightedLabel: { ttl: -1 } }, require_some_consent: false }, token: "117" }]>
         
     | 
| 
      
 570 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 571 
     | 
    
         
            +
                              end
         
     | 
| 
       553 
572 
     | 
    
         | 
| 
       554 
     | 
    
         
            -
             
     | 
| 
       555 
     | 
    
         
            -
             
     | 
| 
       556 
     | 
    
         
            -
             
     | 
| 
       557 
     | 
    
         
            -
             
     | 
| 
       558 
     | 
    
         
            -
             
     | 
| 
       559 
     | 
    
         
            -
             
     | 
| 
       560 
     | 
    
         
            -
             
     | 
| 
       561 
     | 
    
         
            -
             
     | 
| 
       562 
     | 
    
         
            -
             
     | 
| 
       563 
     | 
    
         
            -
             
     | 
| 
       564 
     | 
    
         
            -
             
     | 
| 
       565 
     | 
    
         
            -
             
     | 
| 
       566 
     | 
    
         
            -
             
     | 
| 
       567 
     | 
    
         
            -
             
     | 
| 
       568 
     | 
    
         
            -
             
     | 
| 
       569 
     | 
    
         
            -
             
     | 
| 
       570 
     | 
    
         
            -
             
     | 
| 
       571 
     | 
    
         
            -
             
     | 
| 
       572 
     | 
    
         
            -
             
     | 
| 
       573 
     | 
    
         
            -
             
     | 
| 
       574 
     | 
    
         
            -
             
     | 
| 
       575 
     | 
    
         
            -
                           
     | 
| 
       576 
     | 
    
         
            -
             
     | 
| 
       577 
     | 
    
         
            -
             
     | 
| 
       578 
     | 
    
         
            -
             
     | 
| 
       579 
     | 
    
         
            -
             
     | 
| 
       580 
     | 
    
         
            -
                           
     | 
| 
       581 
     | 
    
         
            -
             
     | 
| 
       582 
     | 
    
         
            -
             
     | 
| 
       583 
     | 
    
         
            -
             
     | 
| 
       584 
     | 
    
         
            -
             
     | 
| 
       585 
     | 
    
         
            -
             
     | 
| 
       586 
     | 
    
         
            -
             
     | 
| 
       587 
     | 
    
         
            -
             
     | 
| 
       588 
     | 
    
         
            -
                           
     | 
| 
       589 
     | 
    
         
            -
             
     | 
| 
       590 
     | 
    
         
            -
             
     | 
| 
       591 
     | 
    
         
            -
             
     | 
| 
       592 
     | 
    
         
            -
             
     | 
| 
       593 
     | 
    
         
            -
             
     | 
| 
       594 
     | 
    
         
            -
             
     | 
| 
       595 
     | 
    
         
            -
             
     | 
| 
       596 
     | 
    
         
            -
             
     | 
| 
       597 
     | 
    
         
            -
             
     | 
| 
       598 
     | 
    
         
            -
             
     | 
| 
       599 
     | 
    
         
            -
             
     | 
| 
       600 
     | 
    
         
            -
             
     | 
| 
       601 
     | 
    
         
            -
             
     | 
| 
       602 
     | 
    
         
            -
             
     | 
| 
       603 
     | 
    
         
            -
             
     | 
| 
       604 
     | 
    
         
            -
             
     | 
| 
       605 
     | 
    
         
            -
             
     | 
| 
       606 
     | 
    
         
            -
             
     | 
| 
       607 
     | 
    
         
            -
             
     | 
| 
       608 
     | 
    
         
            -
             
     | 
| 
       609 
     | 
    
         
            -
             
     | 
| 
       610 
     | 
    
         
            -
             
     | 
| 
       611 
     | 
    
         
            -
             
     | 
| 
       612 
     | 
    
         
            -
             
     | 
| 
       613 
     | 
    
         
            -
             
     | 
| 
       614 
     | 
    
         
            -
             
     | 
| 
      
 573 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 574 
     | 
    
         
            +
                                plain "   to eq "
         
     | 
| 
      
 575 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 576 
     | 
    
         
            +
                                expected %<[{ user_id: "18949452", user: { id: 18949452, name: "Financial Times", screen_name: "FT", location: "London", entities: { url: { urls: [{ url: "http://t.co/dnhLQpd9BY", expanded_url: "http://www.ft.com/", display_url: "ft.com", indices: [0, 22] }] }, description: { urls: [{ url: "https://t.co/5BsmLs9y1Z", expanded_url: "http://FT.com", indices: [65, 88] }] } }, listed_count: 37009, created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, utc_offset: nil, time_zone: nil, geo_enabled: false, verified: true, statuses_count: 273860, media_count: 51044, contributors_enabled: false, is_translator: false, is_translation_enabled: false, profile_background_color: "FFF1E0", profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png", profile_background_tile: false, profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592", profile_image_extensions: { mediaStats: { r: { missing: nil }, ttl: -1 } }, profile_banner_extensions: {}, blocking: false, blocked_by: false, want_retweets: false, advertiser_account_type: "none", advertiser_account_service_levels: [], profile_interstitial_type: "", business_profile_state: "none", translator_type: "none", followed_by: false, ext: { highlightedLabel: { ttl: -1 } }, require_some_consent: false }, token: "117" }]>
         
     | 
| 
      
 577 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 578 
     | 
    
         
            +
                              end
         
     | 
| 
      
 579 
     | 
    
         
            +
                            end,
         
     | 
| 
      
 580 
     | 
    
         
            +
                          diff:
         
     | 
| 
      
 581 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 582 
     | 
    
         
            +
                              plain_line "  ["
         
     | 
| 
      
 583 
     | 
    
         
            +
                              plain_line "    {"
         
     | 
| 
      
 584 
     | 
    
         
            +
                              plain_line %|      user_id: "18949452",|
         
     | 
| 
      
 585 
     | 
    
         
            +
                              plain_line "      user: {"
         
     | 
| 
      
 586 
     | 
    
         
            +
                              plain_line "        id: 18949452,"
         
     | 
| 
      
 587 
     | 
    
         
            +
                              plain_line %|        name: "Financial Times",|
         
     | 
| 
      
 588 
     | 
    
         
            +
                              plain_line %|        screen_name: "FT",|
         
     | 
| 
      
 589 
     | 
    
         
            +
                              plain_line %|        location: "London",|
         
     | 
| 
      
 590 
     | 
    
         
            +
                              actual_line %|+       url: "http://t.co/dnhLQpd9BY",|
         
     | 
| 
      
 591 
     | 
    
         
            +
                              plain_line "        entities: {"
         
     | 
| 
      
 592 
     | 
    
         
            +
                              plain_line "          url: {"
         
     | 
| 
      
 593 
     | 
    
         
            +
                              plain_line "            urls: ["
         
     | 
| 
      
 594 
     | 
    
         
            +
                              elision_marker_line "              # ..."
         
     | 
| 
      
 595 
     | 
    
         
            +
                              plain_line "            ]"
         
     | 
| 
      
 596 
     | 
    
         
            +
                              plain_line "          },"
         
     | 
| 
      
 597 
     | 
    
         
            +
                              plain_line "          description: {"
         
     | 
| 
      
 598 
     | 
    
         
            +
                              plain_line "            urls: ["
         
     | 
| 
      
 599 
     | 
    
         
            +
                              plain_line "              {"
         
     | 
| 
      
 600 
     | 
    
         
            +
                              elision_marker_line "                # ..."
         
     | 
| 
      
 601 
     | 
    
         
            +
                              expected_line %|-               expanded_url: "http://FT.com",|
         
     | 
| 
      
 602 
     | 
    
         
            +
                              actual_line %|+               display_url: "FT.com",|
         
     | 
| 
      
 603 
     | 
    
         
            +
                              plain_line "                indices: ["
         
     | 
| 
      
 604 
     | 
    
         
            +
                              plain_line "                  65,"
         
     | 
| 
      
 605 
     | 
    
         
            +
                              plain_line "                  88"
         
     | 
| 
      
 606 
     | 
    
         
            +
                              plain_line "                ]"
         
     | 
| 
      
 607 
     | 
    
         
            +
                              plain_line "              }"
         
     | 
| 
      
 608 
     | 
    
         
            +
                              plain_line "            ]"
         
     | 
| 
      
 609 
     | 
    
         
            +
                              plain_line "          }"
         
     | 
| 
      
 610 
     | 
    
         
            +
                              plain_line "        },"
         
     | 
| 
      
 611 
     | 
    
         
            +
                              actual_line "+       protected: false,"
         
     | 
| 
      
 612 
     | 
    
         
            +
                              elision_marker_line "        # ..."
         
     | 
| 
      
 613 
     | 
    
         
            +
                              expected_line %|-       profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",|
         
     | 
| 
      
 614 
     | 
    
         
            +
                              expected_line "-       profile_background_tile: false,"
         
     | 
| 
      
 615 
     | 
    
         
            +
                              expected_line %|-       profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",|
         
     | 
| 
      
 616 
     | 
    
         
            +
                              actual_line %|+       profile_background_image_url: "http://abs.twimg.com/images/themes/theme1/bg.png",|
         
     | 
| 
      
 617 
     | 
    
         
            +
                              plain_line %|        profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",|
         
     | 
| 
      
 618 
     | 
    
         
            +
                              plain_line %|        profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592",|
         
     | 
| 
      
 619 
     | 
    
         
            +
                              plain_line "        profile_image_extensions: {"
         
     | 
| 
      
 620 
     | 
    
         
            +
                              elision_marker_line "          # ..."
         
     | 
| 
      
 621 
     | 
    
         
            +
                              plain_line "        },"
         
     | 
| 
      
 622 
     | 
    
         
            +
                              plain_line "        profile_banner_extensions: {},"
         
     | 
| 
      
 623 
     | 
    
         
            +
                              plain_line "        blocking: false,"
         
     | 
| 
      
 624 
     | 
    
         
            +
                              plain_line "        blocked_by: false,"
         
     | 
| 
      
 625 
     | 
    
         
            +
                              plain_line "        want_retweets: false,"
         
     | 
| 
      
 626 
     | 
    
         
            +
                              plain_line %|        advertiser_account_type: "none",|
         
     | 
| 
      
 627 
     | 
    
         
            +
                              expected_line "-       advertiser_account_service_levels: [],"
         
     | 
| 
      
 628 
     | 
    
         
            +
                              elision_marker_line "        # ..."
         
     | 
| 
      
 629 
     | 
    
         
            +
                              plain_line "      },"
         
     | 
| 
      
 630 
     | 
    
         
            +
                              plain_line %|      token: "117"|
         
     | 
| 
      
 631 
     | 
    
         
            +
                              plain_line "    }"
         
     | 
| 
      
 632 
     | 
    
         
            +
                              plain_line "  ]"
         
     | 
| 
      
 633 
     | 
    
         
            +
                            end
         
     | 
| 
      
 634 
     | 
    
         
            +
                        )
         
     | 
| 
       615 
635 
     | 
    
         | 
| 
       616 
     | 
    
         
            -
                      expect(program).
         
     | 
| 
       617 
     | 
    
         
            -
                         
     | 
| 
       618 
     | 
    
         
            -
             
     | 
| 
      
 636 
     | 
    
         
            +
                      expect(program).to produce_output_when_run(expected_output).in_color(
         
     | 
| 
      
 637 
     | 
    
         
            +
                        color_enabled
         
     | 
| 
      
 638 
     | 
    
         
            +
                      )
         
     | 
| 
       619 
639 
     | 
    
         
             
                    end
         
     | 
| 
       620 
640 
     | 
    
         
             
                  end
         
     | 
| 
       621 
641 
     | 
    
         
             
                end
         
     | 
| 
         @@ -787,126 +807,130 @@ shared_examples_for "a matcher that supports elided diffs" do 
     | 
|
| 
       787 
807 
     | 
    
         
             
                        ]
         
     | 
| 
       788 
808 
     | 
    
         
             
                        expect(actual).to #{matcher}(expected)
         
     | 
| 
       789 
809 
     | 
    
         
             
                      TEST
         
     | 
| 
       790 
     | 
    
         
            -
                      program = 
     | 
| 
       791 
     | 
    
         
            -
                         
     | 
| 
       792 
     | 
    
         
            -
             
     | 
| 
       793 
     | 
    
         
            -
             
     | 
| 
       794 
     | 
    
         
            -
                           
     | 
| 
       795 
     | 
    
         
            -
             
     | 
| 
       796 
     | 
    
         
            -
             
     | 
| 
       797 
     | 
    
         
            -
             
     | 
| 
      
 810 
     | 
    
         
            +
                      program =
         
     | 
| 
      
 811 
     | 
    
         
            +
                        make_plain_test_program(
         
     | 
| 
      
 812 
     | 
    
         
            +
                          snippet,
         
     | 
| 
      
 813 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 814 
     | 
    
         
            +
                          configuration: {
         
     | 
| 
      
 815 
     | 
    
         
            +
                            diff_elision_enabled: false,
         
     | 
| 
      
 816 
     | 
    
         
            +
                            diff_elision_maximum: 10
         
     | 
| 
      
 817 
     | 
    
         
            +
                          }
         
     | 
| 
      
 818 
     | 
    
         
            +
                        )
         
     | 
| 
       798 
819 
     | 
    
         | 
| 
       799 
     | 
    
         
            -
                      expected_output = 
     | 
| 
       800 
     | 
    
         
            -
                         
     | 
| 
       801 
     | 
    
         
            -
             
     | 
| 
       802 
     | 
    
         
            -
             
     | 
| 
       803 
     | 
    
         
            -
             
     | 
| 
       804 
     | 
    
         
            -
                           
     | 
| 
       805 
     | 
    
         
            -
                             
     | 
| 
       806 
     | 
    
         
            -
             
     | 
| 
       807 
     | 
    
         
            -
             
     | 
| 
       808 
     | 
    
         
            -
             
     | 
| 
       809 
     | 
    
         
            -
             
     | 
| 
      
 820 
     | 
    
         
            +
                      expected_output =
         
     | 
| 
      
 821 
     | 
    
         
            +
                        build_expected_output(
         
     | 
| 
      
 822 
     | 
    
         
            +
                          color_enabled: color_enabled,
         
     | 
| 
      
 823 
     | 
    
         
            +
                          snippet: %|expect(actual).to #{matcher}(expected)|,
         
     | 
| 
      
 824 
     | 
    
         
            +
                          newline_before_expectation: true,
         
     | 
| 
      
 825 
     | 
    
         
            +
                          expectation:
         
     | 
| 
      
 826 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 827 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 828 
     | 
    
         
            +
                                plain "Expected "
         
     | 
| 
      
 829 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 830 
     | 
    
         
            +
                                actual %<[{ user_id: "18949452", user: { id: 18949452, name: "Financial Times", screen_name: "FT", location: "London", url: "http://t.co/dnhLQpd9BY", entities: { url: { urls: [{ url: "http://t.co/dnhLQpd9BY", expanded_url: "http://www.ft.com/", display_url: "ft.com", indices: [0, 22] }] }, description: { urls: [{ url: "https://t.co/5BsmLs9y1Z", display_url: "FT.com", indices: [65, 88] }] } }, protected: false, listed_count: 37009, created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, utc_offset: nil, time_zone: nil, geo_enabled: false, verified: true, statuses_count: 273860, media_count: 51044, contributors_enabled: false, is_translator: false, is_translation_enabled: false, profile_background_color: "FFF1E0", profile_background_image_url: "http://abs.twimg.com/images/themes/theme1/bg.png", profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592", profile_image_extensions: { mediaStats: { r: { missing: nil }, ttl: -1 } }, profile_banner_extensions: {}, blocking: false, blocked_by: false, want_retweets: false, advertiser_account_type: "none", profile_interstitial_type: "", business_profile_state: "none", translator_type: "none", followed_by: false, ext: { highlightedLabel: { ttl: -1 } }, require_some_consent: false }, token: "117" }]>
         
     | 
| 
      
 831 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 832 
     | 
    
         
            +
                              end
         
     | 
| 
       810 
833 
     | 
    
         | 
| 
       811 
     | 
    
         
            -
             
     | 
| 
       812 
     | 
    
         
            -
             
     | 
| 
       813 
     | 
    
         
            -
             
     | 
| 
       814 
     | 
    
         
            -
             
     | 
| 
       815 
     | 
    
         
            -
             
     | 
| 
       816 
     | 
    
         
            -
             
     | 
| 
       817 
     | 
    
         
            -
             
     | 
| 
       818 
     | 
    
         
            -
             
     | 
| 
       819 
     | 
    
         
            -
             
     | 
| 
       820 
     | 
    
         
            -
             
     | 
| 
       821 
     | 
    
         
            -
             
     | 
| 
       822 
     | 
    
         
            -
             
     | 
| 
       823 
     | 
    
         
            -
             
     | 
| 
       824 
     | 
    
         
            -
             
     | 
| 
       825 
     | 
    
         
            -
             
     | 
| 
       826 
     | 
    
         
            -
             
     | 
| 
       827 
     | 
    
         
            -
             
     | 
| 
       828 
     | 
    
         
            -
             
     | 
| 
       829 
     | 
    
         
            -
             
     | 
| 
       830 
     | 
    
         
            -
             
     | 
| 
       831 
     | 
    
         
            -
             
     | 
| 
       832 
     | 
    
         
            -
             
     | 
| 
       833 
     | 
    
         
            -
             
     | 
| 
       834 
     | 
    
         
            -
             
     | 
| 
       835 
     | 
    
         
            -
             
     | 
| 
       836 
     | 
    
         
            -
             
     | 
| 
       837 
     | 
    
         
            -
             
     | 
| 
       838 
     | 
    
         
            -
             
     | 
| 
       839 
     | 
    
         
            -
             
     | 
| 
       840 
     | 
    
         
            -
                           
     | 
| 
       841 
     | 
    
         
            -
             
     | 
| 
       842 
     | 
    
         
            -
             
     | 
| 
       843 
     | 
    
         
            -
             
     | 
| 
       844 
     | 
    
         
            -
             
     | 
| 
       845 
     | 
    
         
            -
             
     | 
| 
       846 
     | 
    
         
            -
             
     | 
| 
       847 
     | 
    
         
            -
             
     | 
| 
       848 
     | 
    
         
            -
             
     | 
| 
       849 
     | 
    
         
            -
             
     | 
| 
       850 
     | 
    
         
            -
             
     | 
| 
       851 
     | 
    
         
            -
             
     | 
| 
       852 
     | 
    
         
            -
             
     | 
| 
       853 
     | 
    
         
            -
                           
     | 
| 
       854 
     | 
    
         
            -
             
     | 
| 
       855 
     | 
    
         
            -
             
     | 
| 
       856 
     | 
    
         
            -
             
     | 
| 
       857 
     | 
    
         
            -
             
     | 
| 
       858 
     | 
    
         
            -
             
     | 
| 
       859 
     | 
    
         
            -
             
     | 
| 
       860 
     | 
    
         
            -
             
     | 
| 
       861 
     | 
    
         
            -
             
     | 
| 
       862 
     | 
    
         
            -
             
     | 
| 
       863 
     | 
    
         
            -
             
     | 
| 
       864 
     | 
    
         
            -
             
     | 
| 
       865 
     | 
    
         
            -
             
     | 
| 
       866 
     | 
    
         
            -
             
     | 
| 
       867 
     | 
    
         
            -
             
     | 
| 
       868 
     | 
    
         
            -
             
     | 
| 
       869 
     | 
    
         
            -
             
     | 
| 
       870 
     | 
    
         
            -
             
     | 
| 
       871 
     | 
    
         
            -
             
     | 
| 
       872 
     | 
    
         
            -
             
     | 
| 
       873 
     | 
    
         
            -
             
     | 
| 
       874 
     | 
    
         
            -
             
     | 
| 
       875 
     | 
    
         
            -
             
     | 
| 
       876 
     | 
    
         
            -
             
     | 
| 
       877 
     | 
    
         
            -
             
     | 
| 
       878 
     | 
    
         
            -
             
     | 
| 
       879 
     | 
    
         
            -
             
     | 
| 
       880 
     | 
    
         
            -
                           
     | 
| 
       881 
     | 
    
         
            -
             
     | 
| 
       882 
     | 
    
         
            -
             
     | 
| 
       883 
     | 
    
         
            -
             
     | 
| 
       884 
     | 
    
         
            -
             
     | 
| 
       885 
     | 
    
         
            -
             
     | 
| 
       886 
     | 
    
         
            -
             
     | 
| 
       887 
     | 
    
         
            -
             
     | 
| 
       888 
     | 
    
         
            -
             
     | 
| 
       889 
     | 
    
         
            -
             
     | 
| 
       890 
     | 
    
         
            -
             
     | 
| 
       891 
     | 
    
         
            -
             
     | 
| 
       892 
     | 
    
         
            -
             
     | 
| 
       893 
     | 
    
         
            -
             
     | 
| 
       894 
     | 
    
         
            -
             
     | 
| 
       895 
     | 
    
         
            -
             
     | 
| 
       896 
     | 
    
         
            -
             
     | 
| 
       897 
     | 
    
         
            -
             
     | 
| 
       898 
     | 
    
         
            -
             
     | 
| 
       899 
     | 
    
         
            -
             
     | 
| 
       900 
     | 
    
         
            -
             
     | 
| 
       901 
     | 
    
         
            -
             
     | 
| 
       902 
     | 
    
         
            -
             
     | 
| 
       903 
     | 
    
         
            -
             
     | 
| 
       904 
     | 
    
         
            -
             
     | 
| 
       905 
     | 
    
         
            -
             
     | 
| 
      
 834 
     | 
    
         
            +
                              line do
         
     | 
| 
      
 835 
     | 
    
         
            +
                                plain "   to eq "
         
     | 
| 
      
 836 
     | 
    
         
            +
                                # rubocop:disable Layout/LineLength
         
     | 
| 
      
 837 
     | 
    
         
            +
                                expected %<[{ user_id: "18949452", user: { id: 18949452, name: "Financial Times", screen_name: "FT", location: "London", entities: { url: { urls: [{ url: "http://t.co/dnhLQpd9BY", expanded_url: "http://www.ft.com/", display_url: "ft.com", indices: [0, 22] }] }, description: { urls: [{ url: "https://t.co/5BsmLs9y1Z", expanded_url: "http://FT.com", indices: [65, 88] }] } }, listed_count: 37009, created_at: "Tue Jan 13 19:28:24 +0000 2009", favourites_count: 38, utc_offset: nil, time_zone: nil, geo_enabled: false, verified: true, statuses_count: 273860, media_count: 51044, contributors_enabled: false, is_translator: false, is_translation_enabled: false, profile_background_color: "FFF1E0", profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png", profile_background_tile: false, profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg", profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592", profile_image_extensions: { mediaStats: { r: { missing: nil }, ttl: -1 } }, profile_banner_extensions: {}, blocking: false, blocked_by: false, want_retweets: false, advertiser_account_type: "none", advertiser_account_service_levels: [], profile_interstitial_type: "", business_profile_state: "none", translator_type: "none", followed_by: false, ext: { highlightedLabel: { ttl: -1 } }, require_some_consent: false }, token: "117" }]>
         
     | 
| 
      
 838 
     | 
    
         
            +
                                # rubocop:enable Layout/LineLength
         
     | 
| 
      
 839 
     | 
    
         
            +
                              end
         
     | 
| 
      
 840 
     | 
    
         
            +
                            end,
         
     | 
| 
      
 841 
     | 
    
         
            +
                          diff:
         
     | 
| 
      
 842 
     | 
    
         
            +
                            proc do
         
     | 
| 
      
 843 
     | 
    
         
            +
                              plain_line "  ["
         
     | 
| 
      
 844 
     | 
    
         
            +
                              plain_line "    {"
         
     | 
| 
      
 845 
     | 
    
         
            +
                              plain_line %|      user_id: "18949452",|
         
     | 
| 
      
 846 
     | 
    
         
            +
                              plain_line "      user: {"
         
     | 
| 
      
 847 
     | 
    
         
            +
                              plain_line "        id: 18949452,"
         
     | 
| 
      
 848 
     | 
    
         
            +
                              plain_line %|        name: "Financial Times",|
         
     | 
| 
      
 849 
     | 
    
         
            +
                              plain_line %|        screen_name: "FT",|
         
     | 
| 
      
 850 
     | 
    
         
            +
                              plain_line %|        location: "London",|
         
     | 
| 
      
 851 
     | 
    
         
            +
                              actual_line %|+       url: "http://t.co/dnhLQpd9BY",|
         
     | 
| 
      
 852 
     | 
    
         
            +
                              plain_line "        entities: {"
         
     | 
| 
      
 853 
     | 
    
         
            +
                              plain_line "          url: {"
         
     | 
| 
      
 854 
     | 
    
         
            +
                              plain_line "            urls: ["
         
     | 
| 
      
 855 
     | 
    
         
            +
                              plain_line "              {"
         
     | 
| 
      
 856 
     | 
    
         
            +
                              plain_line %|                url: "http://t.co/dnhLQpd9BY",|
         
     | 
| 
      
 857 
     | 
    
         
            +
                              plain_line %|                expanded_url: "http://www.ft.com/",|
         
     | 
| 
      
 858 
     | 
    
         
            +
                              plain_line %|                display_url: "ft.com",|
         
     | 
| 
      
 859 
     | 
    
         
            +
                              plain_line "                indices: ["
         
     | 
| 
      
 860 
     | 
    
         
            +
                              plain_line "                  0,"
         
     | 
| 
      
 861 
     | 
    
         
            +
                              plain_line "                  22"
         
     | 
| 
      
 862 
     | 
    
         
            +
                              plain_line "                ]"
         
     | 
| 
      
 863 
     | 
    
         
            +
                              plain_line "              }"
         
     | 
| 
      
 864 
     | 
    
         
            +
                              plain_line "            ]"
         
     | 
| 
      
 865 
     | 
    
         
            +
                              plain_line "          },"
         
     | 
| 
      
 866 
     | 
    
         
            +
                              plain_line "          description: {"
         
     | 
| 
      
 867 
     | 
    
         
            +
                              plain_line "            urls: ["
         
     | 
| 
      
 868 
     | 
    
         
            +
                              plain_line "              {"
         
     | 
| 
      
 869 
     | 
    
         
            +
                              plain_line %|                url: "https://t.co/5BsmLs9y1Z",|
         
     | 
| 
      
 870 
     | 
    
         
            +
                              expected_line %|-               expanded_url: "http://FT.com",|
         
     | 
| 
      
 871 
     | 
    
         
            +
                              actual_line %|+               display_url: "FT.com",|
         
     | 
| 
      
 872 
     | 
    
         
            +
                              plain_line "                indices: ["
         
     | 
| 
      
 873 
     | 
    
         
            +
                              plain_line "                  65,"
         
     | 
| 
      
 874 
     | 
    
         
            +
                              plain_line "                  88"
         
     | 
| 
      
 875 
     | 
    
         
            +
                              plain_line "                ]"
         
     | 
| 
      
 876 
     | 
    
         
            +
                              plain_line "              }"
         
     | 
| 
      
 877 
     | 
    
         
            +
                              plain_line "            ]"
         
     | 
| 
      
 878 
     | 
    
         
            +
                              plain_line "          }"
         
     | 
| 
      
 879 
     | 
    
         
            +
                              plain_line "        },"
         
     | 
| 
      
 880 
     | 
    
         
            +
                              actual_line "+       protected: false,"
         
     | 
| 
      
 881 
     | 
    
         
            +
                              plain_line "        listed_count: 37009,"
         
     | 
| 
      
 882 
     | 
    
         
            +
                              plain_line %|        created_at: "Tue Jan 13 19:28:24 +0000 2009",|
         
     | 
| 
      
 883 
     | 
    
         
            +
                              plain_line "        favourites_count: 38,"
         
     | 
| 
      
 884 
     | 
    
         
            +
                              plain_line "        utc_offset: nil,"
         
     | 
| 
      
 885 
     | 
    
         
            +
                              plain_line "        time_zone: nil,"
         
     | 
| 
      
 886 
     | 
    
         
            +
                              plain_line "        geo_enabled: false,"
         
     | 
| 
      
 887 
     | 
    
         
            +
                              plain_line "        verified: true,"
         
     | 
| 
      
 888 
     | 
    
         
            +
                              plain_line "        statuses_count: 273860,"
         
     | 
| 
      
 889 
     | 
    
         
            +
                              plain_line "        media_count: 51044,"
         
     | 
| 
      
 890 
     | 
    
         
            +
                              plain_line "        contributors_enabled: false,"
         
     | 
| 
      
 891 
     | 
    
         
            +
                              plain_line "        is_translator: false,"
         
     | 
| 
      
 892 
     | 
    
         
            +
                              plain_line "        is_translation_enabled: false,"
         
     | 
| 
      
 893 
     | 
    
         
            +
                              plain_line %|        profile_background_color: "FFF1E0",|
         
     | 
| 
      
 894 
     | 
    
         
            +
                              expected_line %|-       profile_background_image_url_https: "https://abs.twimg.com/images/themes/theme1/bg.png",|
         
     | 
| 
      
 895 
     | 
    
         
            +
                              expected_line "-       profile_background_tile: false,"
         
     | 
| 
      
 896 
     | 
    
         
            +
                              expected_line %|-       profile_image_url: "http://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",|
         
     | 
| 
      
 897 
     | 
    
         
            +
                              actual_line %|+       profile_background_image_url: "http://abs.twimg.com/images/themes/theme1/bg.png",|
         
     | 
| 
      
 898 
     | 
    
         
            +
                              plain_line %|        profile_image_url_https: "https://pbs.twimg.com/profile_images/931156393108885504/EqEMtLhM_normal.jpg",|
         
     | 
| 
      
 899 
     | 
    
         
            +
                              plain_line %|        profile_banner_url: "https://pbs.twimg.com/profile_banners/18949452/1581526592",|
         
     | 
| 
      
 900 
     | 
    
         
            +
                              plain_line "        profile_image_extensions: {"
         
     | 
| 
      
 901 
     | 
    
         
            +
                              plain_line "          mediaStats: {"
         
     | 
| 
      
 902 
     | 
    
         
            +
                              plain_line "            r: {"
         
     | 
| 
      
 903 
     | 
    
         
            +
                              plain_line "              missing: nil"
         
     | 
| 
      
 904 
     | 
    
         
            +
                              plain_line "            },"
         
     | 
| 
      
 905 
     | 
    
         
            +
                              plain_line "            ttl: -1"
         
     | 
| 
      
 906 
     | 
    
         
            +
                              plain_line "          }"
         
     | 
| 
      
 907 
     | 
    
         
            +
                              plain_line "        },"
         
     | 
| 
      
 908 
     | 
    
         
            +
                              plain_line "        profile_banner_extensions: {},"
         
     | 
| 
      
 909 
     | 
    
         
            +
                              plain_line "        blocking: false,"
         
     | 
| 
      
 910 
     | 
    
         
            +
                              plain_line "        blocked_by: false,"
         
     | 
| 
      
 911 
     | 
    
         
            +
                              plain_line "        want_retweets: false,"
         
     | 
| 
      
 912 
     | 
    
         
            +
                              plain_line %|        advertiser_account_type: "none",|
         
     | 
| 
      
 913 
     | 
    
         
            +
                              expected_line "-       advertiser_account_service_levels: [],"
         
     | 
| 
      
 914 
     | 
    
         
            +
                              plain_line %|        profile_interstitial_type: "",|
         
     | 
| 
      
 915 
     | 
    
         
            +
                              plain_line %|        business_profile_state: "none",|
         
     | 
| 
      
 916 
     | 
    
         
            +
                              plain_line %|        translator_type: "none",|
         
     | 
| 
      
 917 
     | 
    
         
            +
                              plain_line "        followed_by: false,"
         
     | 
| 
      
 918 
     | 
    
         
            +
                              plain_line "        ext: {"
         
     | 
| 
      
 919 
     | 
    
         
            +
                              plain_line "          highlightedLabel: {"
         
     | 
| 
      
 920 
     | 
    
         
            +
                              plain_line "            ttl: -1"
         
     | 
| 
      
 921 
     | 
    
         
            +
                              plain_line "          }"
         
     | 
| 
      
 922 
     | 
    
         
            +
                              plain_line "        },"
         
     | 
| 
      
 923 
     | 
    
         
            +
                              plain_line "        require_some_consent: false"
         
     | 
| 
      
 924 
     | 
    
         
            +
                              plain_line "      },"
         
     | 
| 
      
 925 
     | 
    
         
            +
                              plain_line %|      token: "117"|
         
     | 
| 
      
 926 
     | 
    
         
            +
                              plain_line "    }"
         
     | 
| 
      
 927 
     | 
    
         
            +
                              plain_line "  ]"
         
     | 
| 
      
 928 
     | 
    
         
            +
                            end
         
     | 
| 
      
 929 
     | 
    
         
            +
                        )
         
     | 
| 
       906 
930 
     | 
    
         | 
| 
       907 
     | 
    
         
            -
                      expect(program).
         
     | 
| 
       908 
     | 
    
         
            -
                         
     | 
| 
       909 
     | 
    
         
            -
             
     | 
| 
      
 931 
     | 
    
         
            +
                      expect(program).to produce_output_when_run(expected_output).in_color(
         
     | 
| 
      
 932 
     | 
    
         
            +
                        color_enabled
         
     | 
| 
      
 933 
     | 
    
         
            +
                      )
         
     | 
| 
       910 
934 
     | 
    
         
             
                    end
         
     | 
| 
       911 
935 
     | 
    
         
             
                  end
         
     | 
| 
       912 
936 
     | 
    
         
             
                end
         
     |