Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
[ANN] testy.rb - ruby testing that's mad at the world
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="ara.t.howard, post: 4635352"] On Mar 30, 2009, at 2:12 AM, Brian Candler wrote: ( a LOT of good stuff to which i'll reply to selectively here) hmmm. yeah i see that, but disagree that the effort isn't worth it for the *next* programer. yeah i agree. i'm open to suggestion, just has to be very very simple. bingo! i really think the key is having *one* assertion method. i dunno - ruby is pretty good at this value = begin; object.call; rescue => e; e.class; end result.check :error, SomeError, value that seems perfectly fine to me. gives me an idea though - maybe check should take a block result.check(:error, SomeError){ something that raises an error } and use the block to get the actual value as in value = begin; block.call; rescue Object => e; e; end check actually uses === for the comparison so you can do result.check :instance_of, SomeClass, object result.check :matches, /pattern/, string i need to nail that down though. i actually thought of simply patching test/unit... but then there are good test names, contexts, etc. well - here actual always === expected with my current impl. it's essentially example code wrapped in assert_nothing_raised ;-) funny you mention that as i also hate that. my first version of testy actually just failed fast - if one test failed the code reported and aborted. maybe i should consider going back to that? i am finding that good output makes a ton of failures much easer - even using less and searching is easier with testy that anything else. shoulda does work well - i stole it's context concept just yesterday ;-) i used to be on the ramaze list alot too you know ;-) a @ [URL]http://codeforpeople.com/[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
[ANN] testy.rb - ruby testing that's mad at the world
Top