Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Immediately run queued jobs in tests. Otherwise you have to explicitl…

…y drain the queue to actually deliver your emails.
  • Loading branch information...
commit 79db8db415ffb86ab23e4d319c1035d926160d2d 1 parent f176501
@jeremy jeremy authored
View
4 railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
@@ -34,6 +34,6 @@
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
- # Use the testing queue.
- config.queue = ActiveSupport::TestQueue
+ # Use the synchronous queue to run jobs immediately.
+ config.queue = ActiveSupport::SynchronousQueue
end
View
6 railties/test/application/queue_test.rb
@@ -17,10 +17,10 @@ def app_const
@app_const ||= Class.new(Rails::Application)
end
- test "the queue is a TestQueue in test mode" do
+ test "the queue is a SynchronousQueue in test mode" do
app("test")
- assert_kind_of ActiveSupport::TestQueue, Rails.application.queue[:default]
- assert_kind_of ActiveSupport::TestQueue, Rails.queue[:default]
+ assert_kind_of ActiveSupport::SynchronousQueue, Rails.application.queue[:default]
+ assert_kind_of ActiveSupport::SynchronousQueue, Rails.queue[:default]
end
test "the queue is a SynchronousQueue in development mode" do
Please sign in to comment.
Something went wrong with that request. Please try again.