Skip to content

Commit

Permalink
fix tests that weren't expecting me to be checking test.status again
Browse files Browse the repository at this point in the history
  • Loading branch information
Whiteknight committed Jun 24, 2011
1 parent fc4f690 commit 14fe948
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/test/Suite.winxed
Expand Up @@ -70,7 +70,11 @@ namespace Rosella { namespace Test
} catch (e) {
exception = e;
}
test.status.cleanup();
var status = test.status;
int can_cleanup;
${ can can_cleanup, status, "cleanup" };
if (can_cleanup)
status.cleanup();
self.__report_test_result(test, result, exception);
}

Expand Down
2 changes: 1 addition & 1 deletion t/test/Suite.t
Expand Up @@ -48,7 +48,7 @@ class Test::Suite::Test {
my $ftest := Rosella::construct(Rosella::MockObject::Factory);
my $ctest := $ftest.create_typed(MyTestResult);
$ctest.expect_get("method").once.will_return(my_test_function);
$ctest.expect_get("status").once.will_return(1);
$ctest.expect_get("status").at_least(1).will_return(1);
my $test := $ctest.mock;

$suite.__run_test("my_test_function", $test, $result);
Expand Down
2 changes: 1 addition & 1 deletion t/test/Suite_Subclass.t
Expand Up @@ -29,7 +29,7 @@ class Test::Suite_Subclass::Test {
my $ftest := Rosella::construct(Rosella::MockObject::Factory);
my $ctest := $ftest.create_typed(MyTestResult);
$ctest.expect_get("method").once.will_return(my_test_function);
$ctest.expect_get("status").once.will_return(1);
$ctest.expect_get("status").at_least(1).will_return(1);
my $test := $ctest.mock;

$!assert.output_is({
Expand Down

0 comments on commit 14fe948

Please sign in to comment.