diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2015-07-23 17:52:51 +0200 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2015-07-23 18:27:15 +0200 |
commit | 67863aa8440805628477647e1015372d11913ca7 (patch) | |
tree | 5e05513e4a79c3296be386567b044563978e4b18 /railties/test | |
parent | 9a7f011da196f93cec285a6227ad9499434da4d1 (diff) | |
download | rails-67863aa8440805628477647e1015372d11913ca7.tar.gz rails-67863aa8440805628477647e1015372d11913ca7.tar.bz2 rails-67863aa8440805628477647e1015372d11913ca7.zip |
Skip assets, helpers and views generation for API plugins
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 73e68863f4..2f6c66cade 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -544,6 +544,18 @@ class PluginGeneratorTest < Rails::Generators::TestCase end end + def test_skipping_useless_folders_generation_for_api_engines + ['--full', '--mountable'].each do |option| + run_generator [destination_root, option, '--api'] + + assert_no_directory "app/assets" + assert_no_directory "app/helpers" + assert_no_directory "app/views" + + FileUtils.rm_rf destination_root + end + end + protected def action(*args, &block) silence(:stdout){ generator.send(*args, &block) } |