Skip to content

New name for assert_lits_equal ? #25

Description

@PragTob

equal implies full equality aka == which seems confusing (and was pointed out as a downside to introducing assertions into our code base).

Not sure what the best name for this is, I introduced a small wrapper called assert_lists_contain_same for now - it's probably not the best for now happy for other variants but I wonder ig this would be a change considered for the library itself?

Wrapper for reference, yes it's just a module for now not a macro:

      import Assertions, except: [assert_lists_equal: 2, assert_lists_equal: 3]
      import AssertionAdjustments
defmodule ssertionAdjustments do
  require Assertions

  def assert_lists_contain_same(list_a, list_b) do
    Assertions.assert_lists_equal(list_a, list_b)
  end

  def assert_lists_contain_same(list_a, list_b, comparison) do
    Assertions.assert_lists_equal(list_a, list_b, comparison)
  end
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions