diff options
author | Matthew Draper <matthew@trebex.net> | 2017-05-28 10:49:44 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-28 10:49:44 +0930 |
commit | 94d94d0ac3c1026185805905bcaad8e16e05d0ac (patch) | |
tree | f9c629967b5c528e3206eed15645cfeb0c4f312f | |
parent | fcc47bcfccc7578aa0414710eecdad006085a911 (diff) | |
parent | 6eb0e667ed88fccd7278262afd194975ec53c1aa (diff) | |
download | rails-94d94d0ac3c1026185805905bcaad8e16e05d0ac.tar.gz rails-94d94d0ac3c1026185805905bcaad8e16e05d0ac.tar.bz2 rails-94d94d0ac3c1026185805905bcaad8e16e05d0ac.zip |
Merge pull request #29251 from y-yagi/fix_29247
Includes namespace in system test skelton when namespace is specified
-rw-r--r-- | railties/lib/rails/generators/test_unit/system/system_generator.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/system_test_generator_test.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/test_unit/system/system_generator.rb b/railties/lib/rails/generators/test_unit/system/system_generator.rb index aec415a4e5..0514957d9c 100644 --- a/railties/lib/rails/generators/test_unit/system/system_generator.rb +++ b/railties/lib/rails/generators/test_unit/system/system_generator.rb @@ -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 diff --git a/railties/test/generators/system_test_generator_test.rb b/railties/test/generators/system_test_generator_test.rb index e8e561ec49..4622360244 100644 --- a/railties/test/generators/system_test_generator_test.rb +++ b/railties/test/generators/system_test_generator_test.rb @@ -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 |