Skip to content

match_array with single element does not match Rspec behaviour #97

@Mongey

Description

@Mongey

This is valid when super_diff is not installed.

  expect(ids).to match_array(single_id)

With super_diff installed it fails with

Failure/Error: expect(ids).to match_array(single_id)

NoMethodError:
  undefined method `each_with_index' for "my_id":String
  Did you mean?  each_line

I had to update the test to

-        expect(ids).to match_array(single_id)
+        expect(ids).to match_array([single_id])

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