require 'spec_helper'

describe HomeController do
  context 'with rendered views' do
    render_views

    it 'renders home#index' do
      Topic.make!

      get :index

      response.should have_rendered(:index)
    end
  end
end
require 'spec_helper'

describe HomeController do
  context 'issues' do
    it 'loads only published issues' do
      shown     = Issue.make! status: 'published'
      not_shown = Issue.make! status: 'shelved'

      get :index

      assigns(:issues).should == [shown]
    end
  end

  context 'with rendered views' do
    render_views

    it 'renders home#index' do
      Topic.make!

      get :index

      response.should have_rendered(:index)
    end
  end
end
Add spec to make sure only published issues are shown on the front page.
Add spec to make sure only published issues are shown on the front page.
