title: How to use the same shared example and before filter on several RSpec Contexts?
body: <p>I've got a really ugly controller spec that looks like this:</p>
  
  <pre><code>describe "GET index" do
    context "when authorized" do
      before(:each) do
        sign_in @user
      end
  
      ...
    end
  
    include_examples "when unauthorized"
  end
  
  describe "GET show" do
    context "when authorized" do
      before(:each) do
        sign_in @user
      end
  
      ...
    end
  
    include_examples "when unauthorized"
  end
  
  ...
  </code></pre>
  
  <p>Is there any way to move the before filter and shared example out into some kind of common feature of each action? If not, is there any way to DRY this up at all?</p>