diff options
author | Cristian Bica <cristian.bica@gmail.com> | 2014-08-16 00:02:06 +0300 |
---|---|---|
committer | Cristian Bica <cristian.bica@gmail.com> | 2014-08-16 00:02:06 +0300 |
commit | 788aee5acf195d55914e086540f907d9291e9d24 (patch) | |
tree | 614c906eeb3f5eaec9d4ac170d105445b7fc5b73 /activejob/test/jobs/rescue_job.rb | |
parent | c2f1eca19409cbbe72bf89b2087b212341201aa1 (diff) | |
download | rails-788aee5acf195d55914e086540f907d9291e9d24.tar.gz rails-788aee5acf195d55914e086540f907d9291e9d24.tar.bz2 rails-788aee5acf195d55914e086540f907d9291e9d24.zip |
Moved AR testing from using global variable to thread variable
Diffstat (limited to 'activejob/test/jobs/rescue_job.rb')
-rw-r--r-- | activejob/test/jobs/rescue_job.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activejob/test/jobs/rescue_job.rb b/activejob/test/jobs/rescue_job.rb index acf2b81515..e42de4876e 100644 --- a/activejob/test/jobs/rescue_job.rb +++ b/activejob/test/jobs/rescue_job.rb @@ -2,7 +2,7 @@ class RescueJob < ActiveJob::Base class OtherError < StandardError; end rescue_from(ArgumentError) do - $BUFFER << "rescued from ArgumentError" + Thread.current[:ajbuffer] << "rescued from ArgumentError" arguments[0] = "DIFFERENT!" retry_now end @@ -14,7 +14,7 @@ class RescueJob < ActiveJob::Base when "other" raise OtherError else - $BUFFER << "performed beautifully" + Thread.current[:ajbuffer] << "performed beautifully" end end end |