Record initial prompt too

This commit is contained in:
Ryan Fitzgerald 2012-12-23 20:05:37 -08:00
parent 4b5d47cd60
commit ba3457686f
1 changed files with 6 additions and 2 deletions

View File

@ -59,14 +59,14 @@ class ReplTester
end
end
mailbox.pop # wait until the instance reaches its first readline
wait # wait until the instance reaches its first readline
end
# Accept a line of input, as if entered by a user.
def input(input)
reset_output
repl_mailbox.push input
self.last_prompt = mailbox.pop
wait
end
# Assert that the current prompt matches the given string or regex.
@ -104,4 +104,8 @@ class ReplTester
def repl_mailbox
@thread[:mailbox]
end
def wait
@last_prompt = mailbox.pop
end
end