On Feb 15, 1:12 pm, ara.t.how... / noaa.gov wrote: > On Fri, 16 Feb 2007, Tim Pease wrote: > > >> class MyTest < Test::Unit::TestCase > >> def test_foo > >> ... > >> end > > >> def test_bar > >> ... > >> end > > >> if Time.now.wday == 0 > >> skip :test_foo, "The frambulator isn't available on Sundays" > >> end > >> end > > > Now you have test names in two places, and when someone renames > > :test_foo to :test_frambulator ?? Whoops! > > > I like the idea of having a skip assertion inside the test, and it has > > to be first assertion used otherwise an exception is raised. > > > TwP > > why not block form > > class MyTest < Test::Unit::TestCase > def test_bar > assert this > > skip :sometimes, Time.now.wday == 0 do > assert sometimes > end > > assert that > end > end > > obvious it would be augmented with loggig like > > skipping section(sometimes) of test_bar... > > function name scraped with caller[0]... I don't think we need that level of granularity. At lease, I've never hit a scenario where I would need it. It's always all or nothing for any given test. Regards, Dan