Verify, a very basic testing tool

#21

On Sun, Apr 5, 2009 at 8:11 AM, Charles Oliver N.
removed_email_address@domain.invalid wrote:

   verify_exceptions NameError do abcdefghijk end

list the antonyms of “assert” as “deny” and “reject”, and the antonyms of
“refute” as “demonstrate”, “prove”, “accept”, or “embrace”. There’s a
disconnect there I can’t seem to remedy.

  • Charlie

I agree with you that ‘refute’ doesn’t seem right. Not wanting to get
too pedantic about all this (but failing miserably :), from
http://www.abdn.ac.uk/philosophy/guide/glossary.shtml:

“REFUTE To refute a proposition or theory is to establish or prove
that it is false. Lately many people have taken to using ‘refute’ as a
synonym for ‘deny’, but avoid this usage in philosophy. To deny that
God exists is not, in philosophical usage, to refute (or disprove) the
proposition that God exists.”

Generally ‘I assert P’ means ‘I am stating that proposition P is
true’ and ‘I deny Q’ means ‘I am stating that proposition Q’ is false,
which would fit with your interpretation, i.e. if you deny Q and Q
turns out to be false, then you are correct. However, you haven’t
proven anything. Your statement and reality just happen to be in
agreement. To refute Q is to ~prove~ that Q is false. There is no
further argument - Q is false and can only be false. I don’t see how
we can assert that simply because a test turns out to return a false
value we have proven anything. We are simply getting assurance that
our assertions and reality are in agreement. In short, if we are
looking for a candidate to be the antonym of ‘assert’, ‘deny’ seems to
fit the bill.

A further wrinkle: ‘prove’ itself has the somewhat archaic meaning of
‘test’… as in ‘the exception that proves the rule’ :slight_smile:

Regards,
Sean

#22

Sean O’Halpin wrote:

“REFUTE To refute a proposition or theory is to establish or prove
that it is false. Lately many people have taken to using ‘refute’ as a
synonym for ‘deny’, but avoid this usage in philosophy. To deny that
God exists is not, in philosophical usage, to refute (or disprove) the
proposition that God exists.”

You wanna know what sucks? The basic problem here is ‘assert_no’ is
redundant,
so we should use one word. Let’s try to pick a word.

If that word is ‘deny’, then you get this:

assert frobs(rule)
assert knobs(rule)
deny clogs(rule)
assert slobs(rule)

See the problem yet? They don’t line up in columns! The eye thinks the
third
line is something other than an assertion.

So try this:

assert frobs(rule)
assert knobs(rule)
refute clogs(rule)
assert slobs(rule)

Ah, that’s much better! Now you get a gutter in 9th column, and the
whole
meaning goes into your brain much faster.

Except we can’t use “refute” now, despite it exactly parallels 'assert’s
length,
because some language-lawyer wannabe on the interthing found a reason
not to!

So try this:

assert frobs(rule)
assert knobs(rule)
denigh clogs(rule)
assert slobs(rule)

I tried to use El Goog to find some Olde Englische precedent for
“denigh”. Just
my luck nobody used the internet back then…

#23

Phlip wrote:

So try this:
length, because some language-lawyer wannabe on the interthing found a
“denigh”. Just my luck nobody used the internet back then…
That’s uglier than sin, but I like where you’re going with it. How
about “dessert?” Mmm…

#24

I tried to use El Goog to find some Olde Englische precedent for
“denigh”. Just my luck nobody used the internet back then…

That’s uglier than sin, but I like where you’re going with it. How
about “dessert?” Mmm…

http://www.cartoonistgroup.com/store/add.php?iid=16610

#25

On Sun, Apr 5, 2009 at 12:46 PM, Phlip removed_email_address@domain.invalid wrote:

So try this:
length, because some language-lawyer wannabe on the interthing found a
Just my luck nobody used the internet back then…


Phlip

My apologies - I got the wrong end of the stick. I thought we were
talking about the ~meaning~ of the words. If it’s ~length~ you’re
concerned with then how about one of these:

  • abjure
  • absurd (as in ‘to absurd sthg’ rather than the arguably more correct
    ‘absurdify’)
  • negate
  • accept/reject

and, if you relax the 6-letter requirement:

  • avow/deny
  • cheer/curse

and why bother with meaning at all:

  • fizzle/flange
  • pip/pop
  • hoot/blah

and why stop there? You could just use:

T knobs(rule)
F clogs(rule)

That lines up.

(BTW, there is one serious suggestion in there. :slight_smile:

Regards,
Sean

#26

A week or so ago I created Am I Ruby 19, which uses the new Is it Ruby
19 API. It will classify your locally installed gems as works, fails,
untested, and missing.

http://github.com/n3bulous/amiruby19/tree/master

sudo gem install n3bulous-amiruby19

Kev

#27

Sean O’Halpin wrote:

I agree with you that ‘refute’ doesn’t seem right. Not wanting to get
too pedantic about all this (but failing miserably :), from
http://www.abdn.ac.uk/philosophy/guide/glossary.shtml:

Hey, this is exactly my kind of pedantry.

proven anything. Your statement and reality just happen to be in
agreement. To refute Q is to ~prove~ that Q is false. There is no
further argument - Q is false and can only be false. I don’t see how
we can assert that simply because a test turns out to return a false
value we have proven anything. We are simply getting assurance that
our assertions and reality are in agreement. In short, if we are
looking for a candidate to be the antonym of ‘assert’, ‘deny’ seems to
fit the bill.

A further wrinkle: ‘prove’ itself has the somewhat archaic meaning of
‘test’… as in ‘the exception that proves the rule’ :slight_smile:

I think that’s why I have trouble with it…refute says to me we’re
disproving something. So we’d be proving something doesn’t work, proving
something fails, providing something otherwise expected to be true is
false. So I’d say that when an assertion fails, that failure
successfully refutes the condition being asserted. But refutation being
used as assertion seems wrong…we’re trying to show a positive result:
that some condition returns false or nil. We’re not trying to disprove a
condition, nor trying to prove a condition expected to be true is
actually false. refute implies to me that there’s a true expectation
we’re disproving, rather than an expected false/nil result we’re
trying to prove.

  • Charlie
#28

On Apr 4, 2009, at 23:57 , Charles Oliver N. wrote:

I still contend that “refute” means to prove something is not true,
not to prove it false. refute do false end is meaningless.

As I said on ruby-core: You can have your bike-shed for yourself. I
don’t participate in bike-shed arguments. I have better things to do.

#29

On Apr 4, 2009, at 19:14 , Phlip wrote:

Jeremy McAnally wrote:

Though, I do have a question/concern/confusion/something. I
completely and utterly fail to see the point of these new closure
obsessed frameworks or tools.

Expensive setup is a design smell.

Then go use an instance based inheritance language like self. Classes
work just fine and aren’t expensive at all for me.

#30

Kevin wrote:

Fantastic - this stuff ought to be on the Ruby home page, is people are
really interested in promoting 1.9.

I’ll check this out immediately.

t.

Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< removed_email_address@domain.invalid >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
#31

On Sun, Apr 5, 2009 at 2:32 PM, Sean O’Halpin removed_email_address@domain.invalid
wrote:

On Sun, Apr 5, 2009 at 12:46 PM, Phlip removed_email_address@domain.invalid wrote:

  • pip/pop
    What did you do??? Be careful man, pop has a meaning…
    R.
#32

On Sat, Apr 4, 2009 at 7:35 PM, Jeremy McAnally
removed_email_address@domain.invalid wrote:

Though, I do have a question/concern/confusion/something. I
completely and utterly fail to see the point of these new closure
obsessed frameworks or tools.
I do not speak for everyone, but using closures just seems to be
right, it hides the data, avoids any possible clash and is very
elegant, but that is my personal view.
If you do not like closures it will be difficult to understand those
who like them, unless you undergo the trouble to work with closures
yourself and decide if it gives you an edge or not.
Furthermore I believe that using closures allows you to look a little
but farther than Ruby, which might be a good thing.

I like closures as much as
the next guy, but I don’t see how they revolutionize my testing life.
I would not think that this has anything to do with testing. All I
want to achieve is to minimize the risk that the user of a framework
stumbles into a debugging nightmare because she stepped on the feet of
the framework.

Oh that was a rant? I thought it was a very sensible question and I am
not cynical here at all.
Did I waste my time?

Aimed much less at you, and more at the 4-5 of these I’ve seen in the
past few days.
No offense taken … bones :wink:
R.

#33

Sean O’halpin wrote:

and why stop there? You could just use:

T knobs(rule)
F clogs(rule)

That lines up.

Inspired by this suggestion, I wrote a minimal assertion
testing library akin to Verify, Testy.rb, and assert{ 2.0 }:

Dfect - http://snk.tuxfamily.org/lib/dfect/

It has one method (“D”) for RSpec-style describe() environments,
and four assertion methods (“F”, “E”, “C”, and “T”) which cover
all the assertion functionality provided by the other libraries.

Cheers!

#34

If you English native speakers cannot decide I will make this your
problem :wink:
I will rename #verify to
#make_sure_it_behaves_almost_like_that_with_reasonable_certainty and
#refute to
#without_wanting_to_offend_anyones_philosophical_and_religious_feelings_i_guess_the_following_might_be_wrong
This will eliminate 99.999999% of name collisions too :wink:

Well I guess you understand what I mean, #refute really seems fine
because we are in a reduced context. As true as it might be that
refute does not prove the non existence of something in real life it
seems completely irrelevant in a boolean logic.
But maybe I should provide

#true? and #false?

BTW. I agree with Phlip, size does matter here, aligned code is just
easier to read.

Robert

There are some people who begin the Zoo at the beginning, called
WAYIN, and walk as quickly as they can past every cage until they get
to the one called WAYOUT, but the nicest people go straight to the
animal they love the most, and stay there. ~ A.A. Milne (from
Winnie-the-Pooh)