[Ann] Verify, a very basic testing tool.

P

Phlip

Sean said:
"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...
 
S

Sean O'Halpin

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:

=A0assert frobs(rule)
=A0assert knobs(rule)
=A0deny clogs(rule)
=A0assert slobs(rule)

See the problem yet? They don't line up in columns! The eye thinks the th= ird
line is something other than an assertion.

So try this:

=A0assert frobs(rule)
=A0assert knobs(rule)
=A0refute clogs(rule)
=A0assert 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:

=A0assert frobs(rule)
=A0assert knobs(rule)
=A0denigh clogs(rule)
=A0assert slobs(rule)

I tried to use El Goog to find some Olde Englische precedent for "denigh"=
 
C

Charles Oliver Nutter

Sean said:
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.
"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' :)

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
 
T

Tom Cloyd

Kevin said:
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
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 Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< (e-mail address removed) >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
R

Ryan Davis

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.
 
R

Ryan Davis

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.
 
R

Robert Dober

If you English native speakers cannot decide I will make this your problem ;)
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 ;)

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)
 
R

Robert Dober

- pip/pop
What did you do???? Be careful man, pop has a meaning...
R.


--
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)
 
R

Robert Dober

On Sat, Apr 4, 2009 at 7:35 PM, Jeremy McAnally
Though, I do have a question/concern/confusion/something. =A0I
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.
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 ;)
R.
 
S

Suraj Kurapati

Sean said:
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top