title: R Shiny error when using renderText() with testOutput()
body: <p>I am developing an app in R Shiny where the user can enter or select text which is then used to populate a report, which in turn can be saved as a document. The text should look like:</p>
  
  <blockquote>
    <p>% Title %
    Created by % Created 2016-09-16 #</p>
  </blockquote>
  
  <p>My ui.R code:</p>
  
  <pre><code>library(shiny)
  library(hash)
  shinyUI(mainPanel(
      textInput("report_author", label="Author")))
  </code></pre>
  
  <p>server.R code:</p>
  
  <pre><code>library(shiny)
  source("generate_report.R", local=TRUE)  
  shinyServer(function(input, output) {
  output$final_report &lt;- reactive({
      input_report_author &lt;- input$report_author
      input_report_year = ' ' 
      input_report_month = ' ' 
      input_report_panel = ' '  
      renderText({
        make_report(
          author=input_report_author,
          year=input_report_year,
          month=input_report_month,
          panel=input_report_panel)})})})
  </code></pre>
  
  <p>and generate_report.R:</p>
  
  <pre><code>make_report &lt;- function(panel, author, year, month, date=defaultDate) {
    author = toString(author)
    report_text = paste(
      "% Title\n",
      "% Created by ", author, "\n",
      "% Created ", date, "\n\n",       
      "#", panel, "\n\n",
       sep="")
    return(report_text)}
  </code></pre>
  
  <p>The text that is returned is not what I was aiming for:</p>
  
  <blockquote>
    <p>structure(function (...) ,{, if (length(outputArgs) != 0 &amp;&amp;
    !hasExecuted$get()) {, warning("Unused argument: outputArgs. The
    argument outputArgs is only ", , "meant to be used when embedding
    snippets of Shiny code in an ", , "R Markdown code chunk (using
    runtime: shiny). When running a ", , "full Shiny app, please set the
    output arguments directly in ", , "the corresponding output function
    of your UI code."), hasExecuted$set(TRUE), }, if
    (is.null(formals(origRenderFunc))) , origRenderFunc(), else
    origRenderFunc(...),}, class = "function", outputFunc = function
    (outputId, container = if (inline) span else div, , inline = FALSE)
    ,{, container(id = outputId, class = "shiny-text-output"),},
    outputArgs = list(), hasExecuted = )</p>
  </blockquote>
  
  <p>If I replace &lt;<code>- input$report_author' with a string,</code>, I get the same error, so the fault is likely in the o<code>utput$final_report&lt;-reactive({..})</code> part of the code.</p>
  
  <p>If I try running the app without the <code>reactive({})</code> wrapper, I get an error at the <code>input_report_author=input$report_author</code> code segment:</p>
  
  <blockquote>
    <p>Error in .getReactiveEnvironment()$currentContext() : Operation not
    allowed without an active reactive context.</p>
  </blockquote>
  
  <p>code:</p>
  
  <pre><code>input_report_author = input$report_author
  input_report_year = ' ' 
  input_report_month = ' ' 
  input_report_panel = ' ' 
  output$final_report &lt;- renderText({
      make_report(author=input_report_author, year=input_report_year,
          month=input_report_month, panel=input_report_panel)})
  </code></pre>
  
  <p>Can anyone advise me how to pass in text to a Shiny app and have it return a customized string?</p>