From 931cfc40796bfd2f4638d8ca7a11723d7562e9cd Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Sun, 17 Aug 2014 13:23:24 +0000 Subject: [ActiveJob] Fix tests for sucker_punch --- activejob/test/jobs/gid_job.rb | 2 +- activejob/test/jobs/hello_job.rb | 2 +- activejob/test/jobs/rescue_job.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'activejob/test/jobs') diff --git a/activejob/test/jobs/gid_job.rb b/activejob/test/jobs/gid_job.rb index eeb34c8a87..35c2366ec4 100644 --- a/activejob/test/jobs/gid_job.rb +++ b/activejob/test/jobs/gid_job.rb @@ -1,6 +1,6 @@ class GidJob < ActiveJob::Base def perform(person) - Thread.current[:ajbuffer] << "Person with ID: #{person.id}" + JobBuffer.add("Person with ID: #{person.id}") end end diff --git a/activejob/test/jobs/hello_job.rb b/activejob/test/jobs/hello_job.rb index cb067bbe69..4c6256af0d 100644 --- a/activejob/test/jobs/hello_job.rb +++ b/activejob/test/jobs/hello_job.rb @@ -1,5 +1,5 @@ class HelloJob < ActiveJob::Base def perform(greeter = "David") - Thread.current[:ajbuffer] << "#{greeter} says hello" + JobBuffer.add("#{greeter} says hello") end end diff --git a/activejob/test/jobs/rescue_job.rb b/activejob/test/jobs/rescue_job.rb index e42de4876e..77084160d9 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 - Thread.current[:ajbuffer] << "rescued from ArgumentError" + JobBuffer.add('rescued from ArgumentError') arguments[0] = "DIFFERENT!" retry_now end @@ -14,7 +14,7 @@ class RescueJob < ActiveJob::Base when "other" raise OtherError else - Thread.current[:ajbuffer] << "performed beautifully" + JobBuffer.add('performed beautifully') end end end -- cgit v1.2.3