diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-01-19 16:33:30 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-01-23 02:56:17 +0900 |
commit | 2d61745af4c6f134d1ff4a07d3a702353cd06005 (patch) | |
tree | f3ba9a053ff48f30e421b3b28c64a62618bb65f3 /railties/test | |
parent | ff7593d63ebe628b87b76974c365b9e0707be19f (diff) | |
download | rails-2d61745af4c6f134d1ff4a07d3a702353cd06005.tar.gz rails-2d61745af4c6f134d1ff4a07d3a702353cd06005.tar.bz2 rails-2d61745af4c6f134d1ff4a07d3a702353cd06005.zip |
Merge two tests that needs to initialize Rails before accessing `Rails`
Fixes "NameError: uninitialized constant ApplicationTests::ConfigurationTests::CustomTest::Rails"
when run individually
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration/custom_test.rb | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/railties/test/application/configuration/custom_test.rb b/railties/test/application/configuration/custom_test.rb index 3c675eec71..8360b7bf4b 100644 --- a/railties/test/application/configuration/custom_test.rb +++ b/railties/test/application/configuration/custom_test.rb @@ -10,7 +10,6 @@ module ApplicationTests def teardown teardown_app - FileUtils.rm_rf(new_app) if File.directory?(new_app) end test "access custom configuration point" do @@ -30,28 +29,14 @@ module ApplicationTests assert_equal false, x.hyper_debugger assert_nil x.nil_debugger assert_nil x.i_do_not_exist.zomg - end - test "custom configuration responds to all messages" do - x = Rails.configuration.x + # test that custom configuration responds to all messages 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") - end - - def copy_app - FileUtils.cp_r(app_path, new_app) - end - - def app - @app ||= Rails.application - end - def require_environment require "#{app_path}/config/environment" end |