diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-04-17 20:34:21 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 16:54:11 -0300 |
commit | c19035299a314380285addf6f269591dc648d5cf (patch) | |
tree | c0fc1925acf60600bbee4bd5227ad449a7658194 /railties/test/application | |
parent | 101df203eb8e96a398792a3e3308e93c2fd96a47 (diff) | |
download | rails-c19035299a314380285addf6f269591dc648d5cf.tar.gz rails-c19035299a314380285addf6f269591dc648d5cf.tar.bz2 rails-c19035299a314380285addf6f269591dc648d5cf.zip |
Hide assets, helper, css and js namespaces for api only apps
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/generators_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index 78ada58ec8..5db4638685 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -125,5 +125,20 @@ module ApplicationTests assert_equal expected, c.generators.options end end + + test "api only generators hide assets, helper, js and css namespaces" do + add_to_config <<-RUBY + config.generators.api_only = true + RUBY + + # Initialize the application + require "#{app_path}/config/environment" + Rails.application.load_generators + + assert Rails::Generators.hidden_namespaces.include?("assets") + assert Rails::Generators.hidden_namespaces.include?("helper") + assert Rails::Generators.hidden_namespaces.include?("js") + assert Rails::Generators.hidden_namespaces.include?("css") + end end end |