title: Why is this Rails controller test failing?
body: <p>I'm trying to understand why this test is failing. (I'm kind of new to testing.) I'm using the built-in Rails testing framework with the addition of the Shoulda gem.</p>
  
  <p>The test:</p>
  
  <pre><code>require 'shoulda'
  
  context "on GET to :new" do
  
    setup do
      get(:new)
    end
  
    should_render_template :new
    should_not_set_the_flash
  
  end
  </code></pre>
  
  <p>Fails:</p>
  
  <pre><code>1) Failure:
  test: on GET to :new should render template :new. (SessionsControllerTest)
  [/usr/local/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.0.6/lib/shoulda/controller   /macros.rb:220:in `__bind_1233882600_699194'
  /usr/local/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.0.6/lib/shoulda/context.rb:254:in `call'
  /usr/local/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.0.6/lib/shoulda/context.rb:254:in `test: on GET to :new should render template :new. '
  /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'
  /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:94:in `run']:
  expecting &lt;"new"&gt; but rendering with &lt;""&gt;
  
  2 tests, 2 assertions, 1 failures, 0 errors
  </code></pre>
  
  <p>But if I run it on the console with <code>app.get '/sessions/new'</code> it works fine with no error.</p>
  
  <p>And the "<code>new</code>" template renders as expected in the browser.</p>
  
  <p>I'm using Haml. Maybe that's causing a problem. My template is called "<code>new.html.haml</code>".</p>