From: 7stud -- Date: 2007-10-01T18:40:22+09:00 Subject: Re: unit testing: example p. 156 pickaxe2 7stud -- wrote: > How do you make this example fail: > > require "test/unit" > > class TestsWhichFail < Test::Unit::TestCase > def test_reading > assert_not_nil(ARGF.read, "Read next line of input") > end > end > If I add this line: ARGF.read #<---*** assert_not_nil(ARGF.read, "Read next line of input") and I specify a data file name on the command line, then the test fails. Curiously, if I omit specifying a data file name on the command line, and I type ^D while the program is running, I can't get the test to fail. -- Posted via http://www.ruby-forum.com/.