Sam Duncan wrote in post #1072598:
> On 08/16/2012 10:00 PM, Rob N. wrote:
>> I have found assert_match useful in the past, but have noticed that it
>> is deprecated. That seems a shame.
>>
>> However, I don't understand why assert_match would be deprecated, but
>> not assert_no_match. Can anyone enlighten me?
>>
>> Rob
> Can't comment on why it is deprecated, but it seems like you could
> achieve the same thing simply using assert with a proc that does the
> regexp match?
>
> Sam

Yes. I can do assert(pattern =~ text)

But I then have to build my own failure message. assert_match would fail 
in a way that was informative.

However, my main query is not so much about the loss of assert_match, 
but why assert_match would be dropped, but not assert_no_match. The two 
seem to me a pair. If assert_match is deemed not to be required, then 
surely assert_no_match should also go. Conversely, if there is a good 
case to keep assert_no_match, then surely assert_match should also 
remain.

Rob

-- 
Posted via http://www.ruby-forum.com/.