title: Correct way to use shared_examples_for
body: <p>I might have a flawed understanding of what <code>shared_examples_for</code> should do, but hear me out.</p>
  
  <p>Basically, I have a common navigation bar that appears in <code>index</code> page and <code>new</code> page of Forum. So I want tests for navigation bar to perform for both <code>index</code> page and <code>new</code> page. I was hoping that code below using <code>shared_examples_for</code> would accomplish that. But what happened was that, test cases in <code>shared_examples_for</code> simply is not running. To check I created failing test case within the <code>shared_examples_for</code> scope, but the tests didn't fail.</p>
  
  <p>What am I doing wrong?</p>
  
  
  
  <pre><code>require 'spec_helper'
  
  describe "Forums" do
  
    subject { page }
  
    shared_examples_for "all forum pages" do
  
      describe "should have navigation header" do
        it { should have_selector('nav ul li a', text:'Home') }
        it { should have_selector('nav ul li a', text:'About') }
      end
    end
  
    describe "Index forum page" do
      before { visit root_path }
      ...
    end
  
    describe "New forum page" do
      before { visit new_forum_path }
      ...
    end
  
  end
  </code></pre>