1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Includes namespace in system test skelton when namespace is specified

Fixes #29247
This commit is contained in:
yuuji.yaginuma 2017-05-28 09:09:10 +09:00
parent fcc47bcfcc
commit 6eb0e667ed
2 changed files with 6 additions and 1 deletions

View file

@ -10,7 +10,7 @@ module TestUnit # :nodoc:
template "application_system_test_case.rb", File.join("test", "application_system_test_case.rb")
end
template "system_test.rb", File.join("test/system", "#{file_name.pluralize}_test.rb")
template "system_test.rb", File.join("test/system", class_path, "#{file_name.pluralize}_test.rb")
end
end
end

View file

@ -9,4 +9,9 @@ class SystemTestGeneratorTest < Rails::Generators::TestCase
run_generator
assert_file "test/system/users_test.rb", /class UsersTest < ApplicationSystemTestCase/
end
def test_namespaced_system_test_skeleton_is_created
run_generator %w(admin/user)
assert_file "test/system/admin/users_test.rb", /class Admin::UsersTest < ApplicationSystemTestCase/
end
end