Skip to content

assert_equal shows no diff output on failure, when the diff is a single trailing newline #70

@z1lk

Description

@z1lk
test "string equality" do
  assert_equal "hello", "hello\n"
end

produces

Expected objects to be equal (compared with `actual == expected`):

Actual                       Expected
No changes.

Oddly it is only this exact case. assert_equal "hello", "hello\n\n" and assert_equal "hello\n", "hello\n\n" both show a diff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions