aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/configuration
diff options
context:
space:
mode:
authorDavid Feldman <david.feldman@avant.com>2016-07-05 12:28:12 -0500
committerDavid Feldman <david.feldman@avant.com>2016-07-05 12:28:12 -0500
commit5086432097495e53a5a08be4eb4b1420effd1278 (patch)
tree0de458e10558dea920efa93f44b80be8b9c5a83a /railties/test/application/configuration
parent50819394c8f27fe5343af8398add790d62d63619 (diff)
downloadrails-5086432097495e53a5a08be4eb4b1420effd1278.tar.gz
rails-5086432097495e53a5a08be4eb4b1420effd1278.tar.bz2
rails-5086432097495e53a5a08be4eb4b1420effd1278.zip
implement respond_to_missing? to match method_missing
Diffstat (limited to 'railties/test/application/configuration')
-rw-r--r--railties/test/application/configuration/custom_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/application/configuration/custom_test.rb b/railties/test/application/configuration/custom_test.rb
index 28b3b2f2d6..3e0db6fad8 100644
--- a/railties/test/application/configuration/custom_test.rb
+++ b/railties/test/application/configuration/custom_test.rb
@@ -33,6 +33,13 @@ module ApplicationTests
assert_nil x.i_do_not_exist.zomg
end
+ test 'custom configuration responds to all messages' do
+ x = Rails.configuration.x
+ assert_equal true, x.respond_to?(:i_do_not_exist)
+ assert_kind_of Method, x.method(:i_do_not_exist)
+ assert_kind_of ActiveSupport::OrderedOptions, x.i_do_not_exist
+ end
+
private
def new_app
File.expand_path("#{app_path}/../new_app")