diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-17 12:13:22 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-17 12:13:22 +0100 |
commit | 48f5cecdb03f697a710169ccef1885fcaca70788 (patch) | |
tree | fb0620965261d9a77c5ccbfb158fa86573559384 /railties/test/application | |
parent | c4f8ce53b1f9af9585aeec9bbb0c66fc9c48ec1b (diff) | |
parent | d15de0cfb86fa3cc1914892b3d16221115a42dee (diff) | |
download | rails-48f5cecdb03f697a710169ccef1885fcaca70788.tar.gz rails-48f5cecdb03f697a710169ccef1885fcaca70788.tar.bz2 rails-48f5cecdb03f697a710169ccef1885fcaca70788.zip |
Merge pull request #22586 from rails/merge-action-cable
Merge Action Cable into master
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/assets_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 7e9a9a5f3b..7e9213ddc1 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -410,7 +410,7 @@ module ApplicationTests precompile! - assert_equal "Post;\n", File.read(Dir["#{app_path}/public/assets/application-*.js"].first) + assert_match /Post;/, File.read(Dir["#{app_path}/public/assets/application-*.js"].first) end test "initialization on the assets group should set assets_dir" do diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 87e28288ee..b638ca1614 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1307,6 +1307,21 @@ module ApplicationTests assert_equal 'custom key', Rails.application.config.my_custom_config['key'] end + test "config_for use the Pathname object if it is provided" do + app_file 'config/custom.yml', <<-RUBY + development: + key: 'custom key' + RUBY + + add_to_config <<-RUBY + config.my_custom_config = config_for(Pathname.new(Rails.root.join("config/custom.yml"))) + RUBY + + app 'development' + + assert_equal 'custom key', Rails.application.config.my_custom_config['key'] + end + test "config_for raises an exception if the file does not exist" do add_to_config <<-RUBY config.my_custom_config = config_for('custom') |