From: Jeff Wood Date: 2005-08-25T04:21:34+09:00 Subject: Re: The Chainsaw Infanticide Logger Manuever I'm not saying you need to test Logger ... I'm simply stating that you should be asserting ALL of the behaviors you design into your application. What if logger isn't even being called ??? or any of a number of situations like that... Simply verifying that the application behaves in all ways as designed/required isn't "testing Logger". j. On 8/24/05, David Brady wrote: > Eric Hodel wrote: > > > I don't understand why I'm supposed to test a standard library I'm > > using. Usually I read the documentation and expect it to work that > > way, but maybe I'm crazy. > > Me either. I thought Logger was your own code. I agree that you > shouldn't have to unit test a library that you trust. > > If it's just Logger that's crap, then you can shrug and decide not to > trust the library and respond accordingly. But you're right, that Ruby > allows other programmers to open a library you trust and bash it into > untrustworthiness. That's a real problem that should be considered. > > Is the following legal unit test code? > > def test_no_messing_with_trusted_libraries > require 'logger' > Logger.freeze > assert_nothing_raised( require 'suspect_module', "Hey! Somebody's > mucking with the logger module!" ) > end > > You're right, you shouldn't HAVE to run that test. > > -dB > > -- > David Brady > ruby_talk@shinybit.com > I'm feeling really surreal today... OR AM I? > > > -- "So long, and thanks for all the fish" Jeff Wood