Answers for "rspec check array without order"

1

rspec check array without order

expect([1, 2, 3]).to    contain_exactly(2, 3, 1) # pass
  expect([:a, :c, :b]).to contain_exactly(:a, :c ) # fail
Posted by: Guest on September-20-2021
0

rspec check array without order

expect([1, 2, 3]).to    match_array [2, 3, 1] # pass
  expect([:a, :c, :b]).to match_array [:a, :c]  # fail
Posted by: Guest on September-20-2021

Browse Popular Code Answers by Language