sparklemotion/nokogiri — pull request #900 by boutil (2013-05-09 15:11:37+00:00)
Title: exchange string and regexp in assert_match tests

Hi!

MiniTest gem raises a TypeError
TypeError: can't convert Regexp to String
when in assert_match the first argument is a string and the second a
regular expression, as the first argument is always converted to RegExp.

Note that this does not happen with the version of minitest shipped with ruby1.9.3, and has occured with the gem since the following commit in minitest:
https://github.com/seattlerb/minitest/commit/46a2bc313abd96accd786b64c8f928f30327169e

This patch changes the order so that in assert_match, at least one of the operands in =~ is a String.

Cheers,

Cédric