Permalink
Browse files

Start tests for the type of the result we're getting back.

  • Loading branch information...
1 parent 8dde9a1 commit 947091e4b7a1f06dd8a12e66af83b9454ee485be @colomon committed Jan 1, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 t/01-prompt.t
View
@@ -28,8 +28,10 @@ plan *;
{
my $stub = StubIO.new(:input("blue", ""));
- is prompt-conway("Color", :in($stub), :out($stub)),
- "blue", "Successfully input blue";
+ my $result = prompt-conway("Color", :in($stub), :out($stub));
+ ok $result, "Result is true";
+ ok $result ~~ Str, "Result is a Str";
+ is $result, "blue", "Successfully input blue";
is $stub.output[0], "Color: ", "Properly added colon & space at end of prompt";
is prompt-conway("Color:", :default("Chartreuse"), :in($stub), :out($stub)),
"Chartreuse", "Successfully got default input";

0 comments on commit 947091e

Please sign in to comment.