@@ -6,13 +6,13 @@ plan 58;
6
6
{
7
7
my $ p = Promise . new ;
8
8
is $ p . status, Planned, " Newly created Promise has Planned status" ;
9
- nok $ p . has_result , " Newly created Promise has now result yet" ;
9
+ nok $ p . Bool , " Newly created Promise has now result yet" ;
10
10
nok ? $ p , " Newly created Promise is false" ;
11
11
dies_ok { $ p . cause }, " Cannot call cause on a Planned Promise" ;
12
12
13
13
$ p . keep (" kittens" );
14
14
is $ p . status, Kept, " Kept Promise has Kept status" ;
15
- ok $ p . has_result , " Kept Promise has a result" ;
15
+ ok $ p . Bool , " Kept Promise has a result" ;
16
16
ok ? $ p , " Kept Promise is true" ;
17
17
is $ p . result, " kittens" , " Correct result" ;
18
18
@@ -25,7 +25,7 @@ plan 58;
25
25
my $ p = Promise . new ;
26
26
$ p . break (" glass" );
27
27
is $ p . status, Broken, " Broken Promise has Broken status" ;
28
- ok $ p . has_result , " Broken Promise has a result" ;
28
+ ok $ p . Bool , " Broken Promise has a result" ;
29
29
ok ? $ p , " Broken Promise is true" ;
30
30
isa_ok $ p . cause, Exception , " cause returns an exception" ;
31
31
is $ p . cause. message, " glass" , " Correct message" ;
@@ -110,7 +110,7 @@ plan 58;
110
110
my $ p2 = Promise . new ;
111
111
my $ pany = Promise . anyof($ p1 , $ p2 );
112
112
isa_ok $ pany , Promise , " anyof returns a Promise" ;
113
- nok $ pany . has_result , " No result yet" ;
113
+ nok $ pany . Bool , " No result yet" ;
114
114
115
115
$ p1 . keep (1 );
116
116
is $ pany . result, True , " result is true" ;
@@ -139,10 +139,10 @@ plan 58;
139
139
my $ p2 = Promise . new ;
140
140
my $ pall = Promise . allof($ p1 , $ p2 );
141
141
isa_ok $ pall , Promise , " allof returns a Promise" ;
142
- nok $ pall . has_result , " No result yet" ;
142
+ nok $ pall . Bool , " No result yet" ;
143
143
144
144
$ p1 . keep (1 );
145
- nok $ pall . has_result , " Still not kept" ;
145
+ nok $ pall . Bool , " Still not kept" ;
146
146
147
147
$ p2 . keep (1 );
148
148
is $ pall . result, True , " result is true after both kept" ;
0 commit comments