search for: assert_block

Displaying 2 results from an estimated 2 matches for "assert_block".

2006 Jun 23
1
Best practices in test logging
...ject_duplicate_account_name_on_signup log_test_name("test_reject_duplicate_account_name_on_signup") ... # Rest of the test goes here How to make Test::Unit log test name automatically? 2. Log failures using logger A small replacement function for Test::Unit::Assertions::assert_block is enough to write ''Success'' or ''Failed: ...'' in test logs. 3. Log everything from within tests, nothing from application. I try to make application methods as short and clean as possible. And that means (almost) no logging in the application itself....
2007 Apr 24
0
how to capture text from a popup window..in watir
...ssage = nil) _wrap_assertion do begin pipe = IO.popen("ruby exetry.rb #{action}") yield window_text = pipe.read rescue "" pipe.close unless window_text.empty? assert_block(build_message(message, "<?> not found in JavaScript dialog.", pattern)) do window_text.match(pattern) end else raise Test::Unit:: AssertionFailedError.new(...