title: How to use polymorphic_path in a functional test in Rails 3
body: <p>I'm trying to use <code>polymorphic_path</code> in a functional test in Rails 3.</p>
  
  <p>At first I would get </p>
  
  <pre><code>NoMethodError: undefined method `polymorphic_path' for #&lt;ArticlesControllerTest:0x492f17c&gt;
  </code></pre>
  
  <p>And then I added</p>
  
  <pre><code>include Rails.application.routes.url_helpers
  </code></pre>
  
  <p>The <code>undefined method error</code> stopped, but  now regular paths, like <code>article_path(article)</code> for example stopped working:</p>
  
  <pre><code>NameError: undefined local variable or method `default_url_options' for #&lt;ArticlesControllerTest:0x33ccbe0&gt;
  .rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.9/lib/action_dispatch/testing/assertions/routing.rb:175:in `method_missing'
  .rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.9/lib/action_dispatch/routing/url_for.rb:102:in `url_options'
  .rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.9/lib/action_dispatch/routing/url_for.rb:131:in `url_for'
  .rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.9/lib/action_dispatch/routing/route_set.rb:195:in `article_path'
  </code></pre>
  
  <p>I used to be able to use polymorphic_path normally in Rails 2 by including </p>
  
  <pre><code>include ActionController::UrlWriter
  </code></pre>
  
  <p>How can I get this to work in Rails 3?</p>