mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Class collision checks.
This commit is contained in:
parent
e084313640
commit
6bd101188e
5 changed files with 5 additions and 5 deletions
|
@ -2,7 +2,7 @@ module Rails
|
|||
module Generators
|
||||
class IntegrationTestGenerator < NamedBase
|
||||
def check_class_collisions
|
||||
class_collisions class_name, "#{class_name}Test"
|
||||
class_collisions "#{class_name}Test"
|
||||
end
|
||||
|
||||
def create_test_files
|
||||
|
|
|
@ -2,7 +2,7 @@ module Rails
|
|||
module Generators
|
||||
class PerformanceTestGenerator < NamedBase
|
||||
def check_class_collisions
|
||||
class_collisions class_name, "#{class_name}Test"
|
||||
class_collisions "#{class_name}Test"
|
||||
end
|
||||
|
||||
def create_test_files
|
||||
|
|
|
@ -2,7 +2,7 @@ module TestUnit
|
|||
module Generators
|
||||
class HelperGenerator < Base
|
||||
def check_class_collisions
|
||||
class_collisions "#{class_name}Helper"
|
||||
class_collisions "#{class_name}HelperTest"
|
||||
end
|
||||
|
||||
def create_helper_files
|
||||
|
|
|
@ -4,7 +4,7 @@ module TestUnit
|
|||
argument :actions, :type => :array, :default => [], :banner => "method method"
|
||||
|
||||
def check_class_collisions
|
||||
class_collisions class_name, "#{class_name}Test"
|
||||
class_collisions "#{class_name}Test"
|
||||
end
|
||||
|
||||
def create_test_files
|
||||
|
|
|
@ -14,7 +14,7 @@ class HelperGeneratorTest < GeneratorsTestCase
|
|||
|
||||
def test_invokes_default_test_framework
|
||||
run_generator
|
||||
assert_file "test/unit/helpers/admin_helper_test.rb"
|
||||
assert_file "test/unit/helpers/admin_helper_test.rb", /class AdminHelperTest < ActionView::TestCase/
|
||||
end
|
||||
|
||||
def test_logs_if_the_test_framework_cannot_be_found
|
||||
|
|
Loading…
Reference in a new issue