deny, refute, debunk

| | Comments (3)

I've been working a lot on miniunit (still needs a new name) and have been playing with words lately. should has been replaced with must, and should_not (lame!) has been replaced with wont. Wish I could have an apostrophe in there.

For a while Eric and I have added a method to our assertion suite:

def deny exp
  assert ! exp
end

It is a really handy way to describe things. I dislike the look and sound of assert ! blah so we go with deny... but one thing bugs me:

def test\_something
  assert 42 == 6 * 7
  deny 42 == 6 * 9    # does not line up
end

Yeah yeah... I'm OCD or something. I would much rather read:

def test\_something\_better
  assert 42 == 6 * 7
  refute 42 == 6 * 9
end

I was digging through Apple's wonderful dictionary and thesaurus and came up with another possibility: debunk... how much better or worse is this?

def test\_something\_better
  assert 42 == 6 * 7
  debunk 42 == 6 * 9
end

Hell... let's get rid of assert and go with prove and rebut! I've just saved you all an extra key per test! OH! show! Now that's a lot more assertive (pun intended) than assert is. That means I could come back full circle to deny.

That reminds me... I've LONG wanted a list of same-length opposite verbs and adjectives. Google turns up nothing... I'm wondering if I can't somehow generate it with GED's linguistics library.

3 Comments

Apple's dictionary/thesaurus is too much fun :-)

I wonder, are we really "asserting" that something is true, or are checking if it is?

confirm confute

Of course those look too similar, and "assert" is already established.

assert 42 == 6 * 7 refute '42' == 'life, the universe, and everything'

Seems best.

must and wont are awesome. refute is better than debunk. assert is better than show.

Dan, I think I tend to agree.

I think I'm going to stick to:

assert/refute for mini/test.rb must/wont for mini/spec.rb

The only problem with mapping fro assert to must is that I'm going to have to add "be_" to many of the musts to make it read well, but that's pretty minor.

Leave a comment

About this Entry

This page contains a single entry by zenspider published on April 27, 2008 11:11 PM.

miniunit needs a new name was the previous entry in this blog.

must vs will is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en