diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 5f3d1879eb..bb45018a86 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1393,5 +1393,20 @@ module ApplicationTests assert_equal 'unicorn', Rails.application.config.my_custom_config['key'] end + + test "api_only is false by default" do + app 'development' + refute Rails.application.config.api_only + end + + test "api_only generator config is set when api_only is set" do + add_to_config <<-RUBY + config.api_only = true + RUBY + app 'development' + + Rails.application.load_generators + assert Rails.configuration.api_only + end end end