[jifty-devel] I'm designing a DSL for jifty's web testing...
Nelson Elhage
nelhage at bestpractical.com
Thu Jan 18 00:29:15 EST 2007
I'm not actually sure I really like any of them. I'll try to see if I
can figure out why...
On Wed, Jan 17, 2007 at 01:53:54AM -0500, Jesse Vincent wrote:
>
> check { content matches qr{fsck.com} };
This one isn't too bad. The check {...} block doesn't seem like
it has a purpose; I almost want it to be assumed, since we know
we're doing a test.
> content should match qr{fsck.com};
``should match'' is too many words for me. I want my DSLs to be
terse.
> ok($mech->content =~ qr{fsck.com});
This is no better than what we have.
> content matches qr{fsck.com};
This feels like you're asserting something to be true, rather
than testing it. Yes, I realize this goes against what I said in
the first one, but I'm just trying to get thoughts out there.
> content should_match qr{fsck.com};
See above for should_match. Adding the _ just makes it uglier.
> check { content =~ qr{fsck.com} };
> check: content =~ qr{fsck.com};
> check( content =~ qr{fsck.com} );
Same thoughts as the first one. I guess I kinda like the curly
braces and =~ version; It feels like it says what it means, but
is tight enough I won't mind typing it a hundred times (because
for any reasonable app, you probably will be.)
>
> any of those better than any others?
>
- Nelson
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
More information about the jifty-devel
mailing list