aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/jobs
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 18:41:18 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 18:41:18 +0200
commitbde6547bb6a8ddf18fb687bf20893d3dc87e0358 (patch)
tree549bb6e0b876050f688453aaae9d3e03d65e0a34 /activejob/test/jobs
parent93c9534c9871d4adad4bc33b5edc355672b59c61 (diff)
downloadrails-bde6547bb6a8ddf18fb687bf20893d3dc87e0358.tar.gz
rails-bde6547bb6a8ddf18fb687bf20893d3dc87e0358.tar.bz2
rails-bde6547bb6a8ddf18fb687bf20893d3dc87e0358.zip
applies new string literal convention in activejob/test
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
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/kwargs_job.rb2
-rw-r--r--activejob/test/jobs/provider_jid_job.rb2
-rw-r--r--activejob/test/jobs/queue_as_job.rb2
-rw-r--r--activejob/test/jobs/rescue_job.rb8
-rw-r--r--activejob/test/jobs/retry_job.rb4
-rw-r--r--activejob/test/jobs/translated_hello_job.rb4
8 files changed, 13 insertions, 13 deletions
diff --git a/activejob/test/jobs/gid_job.rb b/activejob/test/jobs/gid_job.rb
index e485bfa2dd..42484dc198 100644
--- a/activejob/test/jobs/gid_job.rb
+++ b/activejob/test/jobs/gid_job.rb
@@ -1,4 +1,4 @@
-require_relative '../support/job_buffer'
+require_relative "../support/job_buffer"
class GidJob < ActiveJob::Base
def perform(person)
diff --git a/activejob/test/jobs/hello_job.rb b/activejob/test/jobs/hello_job.rb
index 022fa58e4a..126fefae00 100644
--- a/activejob/test/jobs/hello_job.rb
+++ b/activejob/test/jobs/hello_job.rb
@@ -1,4 +1,4 @@
-require_relative '../support/job_buffer'
+require_relative "../support/job_buffer"
class HelloJob < ActiveJob::Base
def perform(greeter = "David")
diff --git a/activejob/test/jobs/kwargs_job.rb b/activejob/test/jobs/kwargs_job.rb
index 2df17d15ae..9f9d809673 100644
--- a/activejob/test/jobs/kwargs_job.rb
+++ b/activejob/test/jobs/kwargs_job.rb
@@ -1,4 +1,4 @@
-require_relative '../support/job_buffer'
+require_relative "../support/job_buffer"
class KwargsJob < ActiveJob::Base
def perform(argument: 1)
diff --git a/activejob/test/jobs/provider_jid_job.rb b/activejob/test/jobs/provider_jid_job.rb
index e4f585fa94..0c8ba040f5 100644
--- a/activejob/test/jobs/provider_jid_job.rb
+++ b/activejob/test/jobs/provider_jid_job.rb
@@ -1,4 +1,4 @@
-require_relative '../support/job_buffer'
+require_relative "../support/job_buffer"
class ProviderJidJob < ActiveJob::Base
def perform
diff --git a/activejob/test/jobs/queue_as_job.rb b/activejob/test/jobs/queue_as_job.rb
index 897aef52e5..7dc318e736 100644
--- a/activejob/test/jobs/queue_as_job.rb
+++ b/activejob/test/jobs/queue_as_job.rb
@@ -1,4 +1,4 @@
-require_relative '../support/job_buffer'
+require_relative "../support/job_buffer"
class QueueAsJob < ActiveJob::Base
MY_QUEUE = :low_priority
diff --git a/activejob/test/jobs/rescue_job.rb b/activejob/test/jobs/rescue_job.rb
index 4f6376c850..ef8f777437 100644
--- a/activejob/test/jobs/rescue_job.rb
+++ b/activejob/test/jobs/rescue_job.rb
@@ -1,16 +1,16 @@
-require_relative '../support/job_buffer'
+require_relative "../support/job_buffer"
class RescueJob < ActiveJob::Base
class OtherError < StandardError; end
rescue_from(ArgumentError) do
- JobBuffer.add('rescued from ArgumentError')
+ JobBuffer.add("rescued from ArgumentError")
arguments[0] = "DIFFERENT!"
retry_job
end
rescue_from(ActiveJob::DeserializationError) do |e|
- JobBuffer.add('rescued from DeserializationError')
+ JobBuffer.add("rescued from DeserializationError")
JobBuffer.add("DeserializationError original exception was #{e.cause.class.name}")
end
@@ -21,7 +21,7 @@ class RescueJob < ActiveJob::Base
when "other"
raise OtherError
else
- JobBuffer.add('performed beautifully')
+ JobBuffer.add("performed beautifully")
end
end
end
diff --git a/activejob/test/jobs/retry_job.rb b/activejob/test/jobs/retry_job.rb
index 350edee61c..be20156984 100644
--- a/activejob/test/jobs/retry_job.rb
+++ b/activejob/test/jobs/retry_job.rb
@@ -1,5 +1,5 @@
-require_relative '../support/job_buffer'
-require 'active_support/core_ext/integer/inflections'
+require_relative "../support/job_buffer"
+require "active_support/core_ext/integer/inflections"
class DefaultsError < StandardError; end
class LongWaitError < StandardError; end
diff --git a/activejob/test/jobs/translated_hello_job.rb b/activejob/test/jobs/translated_hello_job.rb
index 9657cd3f54..56e9f147b9 100644
--- a/activejob/test/jobs/translated_hello_job.rb
+++ b/activejob/test/jobs/translated_hello_job.rb
@@ -1,8 +1,8 @@
-require_relative '../support/job_buffer'
+require_relative "../support/job_buffer"
class TranslatedHelloJob < ActiveJob::Base
def perform(greeter = "David")
- translations = { en: 'Hello', de: 'Guten Tag' }
+ translations = { en: "Hello", de: "Guten Tag" }
hello = translations[I18n.locale]
JobBuffer.add("#{greeter} says #{hello}")