diff options
-rw-r--r-- | railties/lib/rails/application.rb | 6 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 6ab448910e..1680a6ed00 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -200,7 +200,11 @@ module Rails end def queue #:nodoc: - @queue ||= config.queue.new + @queue ||= build_queue + end + + def build_queue # :nodoc: + config.queue.new end def to_app diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index ac5ac2b93e..252dd0e31a 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -41,6 +41,14 @@ module ApplicationTests FileUtils.rm_rf(new_app) if File.directory?(new_app) end + test "multiple queue construction is possible" do + require 'rails' + require "#{app_path}/config/environment" + mail_queue = Rails.application.build_queue + image_processing_queue = Rails.application.build_queue + assert_not_equal mail_queue, image_processing_queue + end + test "Rails.groups returns available groups" do require "rails" |