require 'spec_helper'

module KnowledgeBase
  describe CategoriesController do
    routes { KnowledgeBase::Engine.routes }

    describe "GET 'index'" do
      it "returns http success" do
        get :index
        response.should be_success
      end
    end

    describe "GET 'show'" do
      it "returns http success" do
        category = create :category

        get :show, id: category.slug

        response.should be_success
      end
    end

  end
end

require 'spec_helper'

module KnowledgeBase
  describe CategoriesController do
    routes { KnowledgeBase::Engine.routes }

    describe "GET 'index'" do
      it "returns http success" do
        get :index
        response.should be_success
      end
    end

    describe "GET 'show'" do
      it "returns http success" do
        category = create :category, :published

        get :show, id: category.slug

        response.should be_success
      end
    end

  end
end

Create a published category in the specs
Create a published category in the specs

Okay, nothing to see here, we don't do failing specs ever. No, move along.
