title: Error when running Sinatra's production?, test? and development? methods from the code blocks
body: <p>I am reading a great book "Jump-start Sinatra" and running all the examples from the book. All the code examples ran great until I reached page 67. This code fails with an error message "NoMethodError at /environment":</p>
  
  <pre><code>get '/environment' do
    if development?
      "development"
    elsif production?
      "production"
    elsif test?
      "test"
    else
      "Who knows what environment you're in!"
    end
  end
  </code></pre>
  
  <p>It seems like the helper methods work only outside of the code blocks, but fail within the code blocks. Am I doing something wrong, or is it an error in the book?</p>