diff options
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 5 | ||||
-rw-r--r-- | railties/test/application/queue_test.rb | 12 |
2 files changed, 8 insertions, 9 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index 81f6096be8..528bec58ef 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -52,14 +52,13 @@ module ApplicationTests test "uses the default queue for ActionMailer" do require "#{app_path}/config/environment" - assert_kind_of ActiveSupport::QueueContainer, ActionMailer::Base.queue + assert_kind_of ActiveSupport::Queue, ActionMailer::Base.queue end test "allows me to configure queue for ActionMailer" do app_file "config/environments/development.rb", <<-RUBY AppTemplate::Application.configure do - Rails.queue[:mailer] = ActiveSupport::TestQueue.new - config.action_mailer.queue = Rails.queue[:mailer] + config.action_mailer.queue = ActiveSupport::TestQueue.new end RUBY diff --git a/railties/test/application/queue_test.rb b/railties/test/application/queue_test.rb index 7d8f665024..080678f2d5 100644 --- a/railties/test/application/queue_test.rb +++ b/railties/test/application/queue_test.rb @@ -19,14 +19,14 @@ module ApplicationTests test "the queue is a SynchronousQueue in test mode" do app("test") - assert_kind_of ActiveSupport::SynchronousQueue, Rails.application.queue[:default] - assert_kind_of ActiveSupport::SynchronousQueue, Rails.queue[:default] + assert_kind_of ActiveSupport::SynchronousQueue, Rails.application.queue + assert_kind_of ActiveSupport::SynchronousQueue, Rails.queue end test "the queue is a SynchronousQueue in development mode" do app("development") - assert_kind_of ActiveSupport::SynchronousQueue, Rails.application.queue[:default] - assert_kind_of ActiveSupport::SynchronousQueue, Rails.queue[:default] + assert_kind_of ActiveSupport::SynchronousQueue, Rails.application.queue + assert_kind_of ActiveSupport::SynchronousQueue, Rails.queue end class ThreadTrackingJob @@ -79,7 +79,7 @@ module ApplicationTests def setup_custom_queue add_to_env_config "production", <<-RUBY require "my_queue" - config.queue = MyQueue + config.queue = MyQueue.new RUBY app_file "lib/my_queue.rb", <<-RUBY @@ -96,7 +96,7 @@ module ApplicationTests test "a custom queue implementation can be provided" do setup_custom_queue - assert_kind_of MyQueue, Rails.queue[:default] + assert_kind_of MyQueue, Rails.queue job = Struct.new(:id, :ran) do def run |