aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/jobs
diff options
context:
space:
mode:
authorAbdelkader Boudih <terminale@gmail.com>2014-08-17 13:23:24 +0000
committerAbdelkader Boudih <terminale@gmail.com>2014-08-17 23:10:45 +0000
commit931cfc40796bfd2f4638d8ca7a11723d7562e9cd (patch)
tree16b02f80182f49bff8e24aef35730111faf48f4d /activejob/test/jobs
parent2f7b239fca6630e49ba8ad9df6fc7db25e1080f0 (diff)
downloadrails-931cfc40796bfd2f4638d8ca7a11723d7562e9cd.tar.gz
rails-931cfc40796bfd2f4638d8ca7a11723d7562e9cd.tar.bz2
rails-931cfc40796bfd2f4638d8ca7a11723d7562e9cd.zip
[ActiveJob] Fix tests for sucker_punch
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r--activejob/test/jobs/gid_job.rb2
-rw-r--r--activejob/test/jobs/hello_job.rb2
-rw-r--r--activejob/test/jobs/rescue_job.rb4
3 files changed, 4 insertions, 4 deletions
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