title: testing REST with shoulda and factory_girl - destroy
body: <p>i'm developing test for REST using shoulda and factory_girl. Code below</p>
  
  <pre><code> context "on :delete to :destroy" do
      setup do
        @controller = NewsArticlesController.new
        @request = ActionController::TestRequest.new
        @response = ActionController::TestResponse.new
  
        @news_article =  Factory.create(:news_article)
  
      end
  
      should "destroy new NewsArticle" do
        assert_difference('NewsArticle.count', -1) do
          delete :destroy, :id =&gt; @news_article.id
        end
      end
  
      should_redirect_to news_articles_path
    end
  </code></pre>
  
  <p>as a result i see </p>
  
  <pre><code>  1) Error:
  test: on :delete to :destroy should redirect to index. (NewsArticlesControllerTest):
  ArgumentError: block not supplied
      c:/develop/ruby/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/action_controller/macros.rb:201:in `instance_eval'
      c:/develop/ruby/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/action_controller/macros.rb:201:in `__bind_1248853182_16800
  0'
      c:/develop/ruby/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:351:in `call'
      c:/develop/ruby/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:351:in `test: on :delete to :destroy should redirect to index. '
  </code></pre>
  
  <p>Could you tell me plz - whats wrong and how i can modify test to make them work right?</p>
  
  <p>UPD: routes looks fine</p>
  
  <pre><code>news_articles GET    /news(.:format)                    {:controller=&gt;"news_articles", :action=&gt;"index"}
  </code></pre>