aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lib/Test/Irssi/Test.pm
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-02-28 00:32:04 +0000
committerTom Feist <shabble@metavore.org>2011-02-28 00:32:04 +0000
commit1063657c9145eed77b9228066488c91880093391 (patch)
tree0c83a09d88e70150bef99c3d301c2b20f714445d /testing/lib/Test/Irssi/Test.pm
parentrandom checkin, thinks are a bit in flux and about to change greatly so I'm (diff)
downloadirssi-scripts-1063657c9145eed77b9228066488c91880093391.tar.gz
irssi-scripts-1063657c9145eed77b9228066488c91880093391.zip
refactor everything to make tests more test-like.
Diffstat (limited to 'testing/lib/Test/Irssi/Test.pm')
-rw-r--r--testing/lib/Test/Irssi/Test.pm14
1 files changed, 5 insertions, 9 deletions
diff --git a/testing/lib/Test/Irssi/Test.pm b/testing/lib/Test/Irssi/Test.pm
index 45e9bb1..7ee511f 100644
--- a/testing/lib/Test/Irssi/Test.pm
+++ b/testing/lib/Test/Irssi/Test.pm
@@ -7,6 +7,7 @@ class Test::Irssi::Test {
use Test::Irssi;
use Test::Irssi::Driver;
use feature qw/say/;
+ use Data::Dump qw/dump/;
has 'parent'
=> (
@@ -167,17 +168,11 @@ class Test::Irssi::Test {
return $item;
}
- sub execute {
- my ($self) = @_;
- # set this as hte currently active test.
- $self->parent->active_test($self);
- $self->evaluate_test;
- }
-
sub evaluate_test {
my ($self) = @_;
while (my $state = $self->get_next_state) {
+ $self->log("Evaluating Test: " . dump($state));
# stimuli
if ( exists($state->{delay})) {
@@ -208,11 +203,12 @@ class Test::Irssi::Test {
}
}
+
+ $poe_kernel->post(IrssiTestDriver => 'test_complete');
+
$self->complete(1);
$self->log("Test Execution Finished");
-
- $poe_kernel->post('IrssiTestDriver' => 'test_complete');
}
sub resume_from_timer {