Browse Source

Cleaned up Slave test a little

Alois Mahdal (@azzgoat) 12 years ago
parent
commit
a64305fd38
1 changed files with 9 additions and 10 deletions
  1. 9
    10
      t/Slave.t

+ 9
- 10
t/Slave.t View File

6
 
6
 
7
 my $repo = SugarTrail::Repo->new(root => './t/data/strepo', vcs => 'git');
7
 my $repo = SugarTrail::Repo->new(root => './t/data/strepo', vcs => 'git');
8
 
8
 
9
-my $m1 = $repo->load_stm(stm=>'/selftest/posititve/multiple_parameters.stm');
10
-ok($m1,             "multiple_parameters: master is true");
9
+my $data;
10
+$data->{mp} = $repo->load_stm(stm=>'/selftest/posititve/multiple_parameters.stm');
11
+$data->{mw} = $repo->load_stm(stm=>'/selftest/negative/multiple_warnings.stm');
11
 
12
 
12
-my $s1 = $m1->generate_slave({ proto => "imap", os => "w7a" });
13
-ok($s1,            "multiple_parameters: slave is true");
13
+ok($data->{mp}, "multiple_parameters: master is true");
14
+ok($data->{mw}, "multiple_warnings: master is true");
14
 
15
 
15
-my $m2 = $repo->load_stm(stm=>'/selftest/negative/multiple_warnings.stm');
16
-ok($m2,             "multiple_warnings: master is true");
16
+my $s1 = $data->{mp}->generate_slave({ proto => "imap", os => "w7a" });
17
+ok($s1,             "multiple_parameters: slave is true");
17
 
18
 
18
-my $s2 = $m2->generate_slave({ os => "w7a", arch => "amd64" });
19
-ok($s2,            "multiple_warnings: slave is true");
19
+my $s2 = $data->{mw}->generate_slave({ os => "w7a", arch => "amd64" });
20
+ok($s2,             "multiple_warnings: slave is true");
20
 
21
 
21
-&helper::dmup(m1=>\$m1);
22
 &helper::dmup(s1=>\$s1);
22
 &helper::dmup(s1=>\$s1);
23
-&helper::dmup(m2=>\$m2);
24
 &helper::dmup(s2=>\$s2);
23
 &helper::dmup(s2=>\$s2);
25
 
24
 
26
 done_testing();
25
 done_testing();