     ".factor-roots" scaffold-rc ;
 
 : make-unit-test ( answer code -- str )
-   [
-        prepend-lines-with-spaces
-        "{\n" "\n}" surround
-    ] [
-        prepend-lines-with-spaces
-        "[\n" "\n] unit-test\n" surround
-    ] bi* " " glue ;
+    [ split-lines [ "    " prepend ] map "\n" join ] bi@
+    [ "{\n" "\n}" surround ] [ "[\n" "\n] unit-test\n" surround ] bi*
+    " " glue ;
 
 : scaffold-unit-test ( -- str/f )
     read-contents dup "" = [

    ] if ;

: scaffold-unit-tests ( -- str )
    [ scaffold-unit-test ] loop>array "\n\n" join ;

HOOK: scaffold-emacs os ( -- )


continuations eval hashtables help.markup interpolate io
io.directories io.encodings.utf8 io.files io.pathnames
io.streams.string kernel math math.parser namespaces prettyprint
quotations sequences sets sorting splitting strings system
timers unicode urls vocabs vocabs.loader vocabs.metadata words
words.symbol ;
IN: tools.scaffold

SYMBOL: developer-name
