Commit f834b0e48ebd1911ebfc13754e35a8af6e49b24a
1 parent
6030289b
Exists in
master
and in
28 other branches
ActionItem65: adding controller_naming_test to check that there are no duplicated controller names.
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@574 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,10 @@ |
1 | +require "#{File.dirname(__FILE__)}/../test_helper" | |
2 | + | |
3 | +class ControllerNamingTest < ActionController::IntegrationTest | |
4 | + | |
5 | + should 'not have controllers with same name in different folders' do | |
6 | + controllers = Dir.glob("#{RAILS_ROOT}/app/controllers/**/*_controller.rb").map { |item| item.split(/\//).last } | |
7 | + assert_equal controllers.uniq, controllers | |
8 | + end | |
9 | + | |
10 | +end | ... | ... |