diff options
-rw-r--r-- | actionpack/test/abstract_unit.rb | 6 | ||||
-rw-r--r-- | actionpack/test/controller/assert_select_test.rb | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 3b0b6e929f..4f5b2895c9 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -26,7 +26,6 @@ require 'active_model' require 'active_record' require 'action_controller/caching' require 'action_controller/caching/sweeping' -require 'rails/queueing' require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late @@ -35,11 +34,6 @@ module Rails def env @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "test") end - - def queue - @queue ||= Rails::Queueing::Container.new(Rails::Queueing::SynchronousQueue.new) - end - end end diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb index 3d667f0a2f..38598a520c 100644 --- a/actionpack/test/controller/assert_select_test.rb +++ b/actionpack/test/controller/assert_select_test.rb @@ -10,6 +10,16 @@ require 'controller/fake_controllers' require 'action_mailer' ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH +class SynchronousQueue < Queue + def push(job) + job.run + end + alias << push + alias enq push +end + +ActionMailer::Base.queue = SynchronousQueue.new + class AssertSelectTest < ActionController::TestCase Assertion = ActiveSupport::TestCase::Assertion |