diff options
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index d6e5f4bd89..0716783d42 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -508,6 +508,21 @@ class PluginGeneratorTest < Rails::Generators::TestCase assert_match(/namespace :admin/, contents) assert_no_match(/namespace :bukkit/, contents) end + assert_file "test/controllers/bukkits/admin/dashboard_controller_test.rb" do |contents| + assert_match(/@routes = Engine.routes/, contents) + end + end + + def test_generating_scaffold_controller_inside_mountable_engine + run_generator [destination_root, "--mountable"] + + capture(:stdout) do + `#{destination_root}/bin/rails g scaffold User name:string age:integer` + end + + assert_file "test/controllers/bukkits/users_controller_test.rb" do |contents| + assert_match(/@routes = Engine.routes/, contents) + end end def test_git_name_and_email_in_gemspec_file |