diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-29 01:05:58 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-29 01:17:49 -0200 |
commit | fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2 (patch) | |
tree | 49257bdeadca12d5b167800a25d58dd50c0d6ddb /activejob/test/support/integration | |
parent | f81a5ffbdec6c1d748aaef02ba10a6e0d86cbf3f (diff) | |
download | rails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.tar.gz rails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.tar.bz2 rails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.zip |
Add more rubocop rules about whitespaces
Diffstat (limited to 'activejob/test/support/integration')
4 files changed, 7 insertions, 7 deletions
diff --git a/activejob/test/support/integration/adapters/que.rb b/activejob/test/support/integration/adapters/que.rb index 3d35a0439f..20faee3427 100644 --- a/activejob/test/support/integration/adapters/que.rb +++ b/activejob/test/support/integration/adapters/que.rb @@ -13,7 +13,7 @@ module QueJobsManager def start_workers que_url = ENV["QUE_DATABASE_URL"] || "postgres:///active_jobs_que_int_test" uri = URI.parse(que_url) - user = uri.user||ENV["USER"] + user = uri.user || ENV["USER"] pass = uri.password db = uri.path[1..-1] %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -c 'drop database if exists "#{db}"' -U #{user} -t template1} diff --git a/activejob/test/support/integration/adapters/queue_classic.rb b/activejob/test/support/integration/adapters/queue_classic.rb index b5d831428e..369693e947 100644 --- a/activejob/test/support/integration/adapters/queue_classic.rb +++ b/activejob/test/support/integration/adapters/queue_classic.rb @@ -12,7 +12,7 @@ module QueueClassicJobsManager def start_workers uri = URI.parse(ENV["QC_DATABASE_URL"]) - user = uri.user||ENV["USER"] + user = uri.user || ENV["USER"] pass = uri.password db = uri.path[1..-1] %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -c 'drop database if exists "#{db}"' -U #{user} -t template1} diff --git a/activejob/test/support/integration/adapters/sneakers.rb b/activejob/test/support/integration/adapters/sneakers.rb index 08743c1f05..911f70407e 100644 --- a/activejob/test/support/integration/adapters/sneakers.rb +++ b/activejob/test/support/integration/adapters/sneakers.rb @@ -39,7 +39,7 @@ module SneakersJobsManager @pid = fork do queues = %w(integration_tests) workers = queues.map do |q| - worker_klass = "ActiveJobWorker"+Digest::MD5.hexdigest(q) + worker_klass = "ActiveJobWorker" + Digest::MD5.hexdigest(q) Sneakers.const_set(worker_klass, Class.new(ActiveJob::QueueAdapters::SneakersAdapter::JobWrapper) do from_queue q end) diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb index da8638895b..3357489f20 100644 --- a/activejob/test/support/integration/test_case_helpers.rb +++ b/activejob/test/support/integration/test_case_helpers.rb @@ -32,7 +32,7 @@ module TestCaseHelpers adapter_class_symbols.map(&:to_s).include? adapter end - def wait_for_jobs_to_finish_for(seconds=60) + def wait_for_jobs_to_finish_for(seconds = 60) begin Timeout.timeout(seconds) do while !job_executed do @@ -47,7 +47,7 @@ module TestCaseHelpers Dummy::Application.root.join("tmp/#{id}") end - def job_executed(id=@id) + def job_executed(id = @id) job_file(id).exist? end @@ -55,11 +55,11 @@ module TestCaseHelpers Marshal.load(File.binread(job_file(id))) end - def job_executed_at(id=@id) + def job_executed_at(id = @id) job_data(id)["executed_at"] end - def job_executed_in_locale(id=@id) + def job_executed_in_locale(id = @id) job_data(id)["locale"] end end |