From: Simon Strandgaard Date: 2004-02-16T06:59:55+09:00 Subject: Re: rubyunit#assert_set_equal, any testunit replacement? On Sun, 15 Feb 2004 20:34:02 +0100, Simon Strandgaard wrote: > I am in the process of converting a testsuite from using Rubyunit, to now > use Test::Unit. > > What the proper replacement for #assert_set_equal? > > Is it sufficiently to use #assert_equal or is there any interesting > algorithm being used? Bommer... its defined in rubicon. # # Check two arrays for set equality # def assert_set_equal(expected, actual) assert_equal([], (expected - actual) | (actual - expected), "Expected: #{expected.inspect}, Actual: #{actual.inspect}") end -- Simon Strandgaard