Sha256: 60e5fdf67665cb015be8cfb524385ac1f749785dced10621a5a2c1b7fe330a2a

Contents?: true

Size: 309 Bytes

Versions: 9

Compression:

Stored size: 309 Bytes

Contents

require 'set'

module MiniTest
  module Assertions
    def assert_has_elements(exp, act, msg = nil)
      msg = message(msg) { "Expected #{act} to have same elements as #{exp}" }
      assert Set.new(exp) == Set.new(act)
    end
  end
end

Object.infect_an_assertion :assert_has_elements, :must_have_elements

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta10 test/support/matchers.rb
spontaneous-0.2.0.beta9 test/support/matchers.rb
spontaneous-0.2.0.beta8 test/support/matchers.rb
spontaneous-0.2.0.beta7 test/support/matchers.rb
spontaneous-0.2.0.beta6 test/support/matchers.rb
spontaneous-0.2.0.beta5 test/support/matchers.rb
spontaneous-0.2.0.beta4 test/support/matchers.rb
spontaneous-0.2.0.beta3 test/support/matchers.rb
spontaneous-0.2.0.beta2 test/support/matchers.rb