RSpec order-agnostic array matching
What’s that? You want to write an expectation for an array but your method returns the Array in a nondeterministic ordering?
Simple. Write:
1
my_method.should =~ <my_expectation>
See the source.
What’s that? You want to write an expectation for an array but your method returns the Array in a nondeterministic ordering?
Simple. Write:
1
my_method.should =~ <my_expectation>
See the source.