 [ ":someuser!n=user@some.where PRIVMSG #factortest :hi"
   parse-irc-line f >>timestamp ] unit-test
 
-{ "" } make-client dup nick>> "factorbot" >>name drop current-irc-client [
+{ "" } make-client dup "factorbot" set-nick current-irc-client [
     { t } [ irc-client> nick>> name>> me? ] unit-test
 
     { "factorbot" } [ irc-client> nick>> name>> ] unit-test

: make-client ( lines -- irc-client )
   "someserver" irc-port "factorbot" f <irc-profile> <irc-client>
   swap [ 2nip <test-stream> f ] curry >>connect ;

: with-dummy-client ( quot -- )
     rot with-variable ; inline

USING: kernel tools.test accessors arrays sequences qualified
       io.streams.string io.streams.duplex namespaces threads
       calendar irc.client.private ;
EXCLUDE: irc.client => join ;
IN: irc.client.tests

