test/test_helper.rb in polynomials-0.2.0 vs test/test_helper.rb in polynomials-0.3.0

- old
+ new

@@ -1,3 +1,21 @@ require 'awesome_print' +require 'simplecov' +SimpleCov.start require 'minitest/autorun' -require_relative '../lib/polynomials.rb' +$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) +$LOAD_PATH.unshift(File.dirname(__FILE__)) +require 'polynomials' + +class MiniTest::Unit::TestCase + include Polynomials + def assert_set_eql(actual,computed) + test = lambda do + actual.all? do |a| + computed.any? do |c| + a.eql?(c) && c.eql?(a) + end + end + end + assert test.call, "Expected #{actual.inspect}, not #{computed.inspect}" + end +end