controller_naming_test.rb 361 Bytes
require "#{File.dirname(__FILE__)}/../test_helper"

class ControllerNamingTest < ActionController::IntegrationTest

  should 'not have controllers with same name in different folders' do
    controllers = Dir.glob("#{Rails.root}/app/controllers/**/*_controller.rb").map { |item| item.split(/\//).last }
    assert_equal controllers.uniq, controllers
  end

end