Permalink
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...
1 parent f176501 commit 79db8db415ffb86ab23e4d319c1035d926160d2d @jeremy jeremy committed Oct 12, 2012
@@ -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
@@ -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

0 comments on commit 79db8db

Please sign in to comment.