aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:36:54 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 19:36:54 +0200
commit301ce2a6d11bc7a016f7ede71e3c6fd9fa0693a3 (patch)
tree23b7b501a5dbd32565b4bfcfee522d9950f79348
parent63fff600accb41b56a3e6ac403d9b1732de3086d (diff)
downloadrails-301ce2a6d11bc7a016f7ede71e3c6fd9fa0693a3.tar.gz
rails-301ce2a6d11bc7a016f7ede71e3c6fd9fa0693a3.tar.bz2
rails-301ce2a6d11bc7a016f7ede71e3c6fd9fa0693a3.zip
modernizes hash syntax in activejob
-rw-r--r--activejob/test/cases/argument_serialization_test.rb2
-rw-r--r--activejob/test/support/integration/adapters/resque.rb2
-rw-r--r--activejob/test/support/integration/adapters/sneakers.rb20
3 files changed, 12 insertions, 12 deletions
diff --git a/activejob/test/cases/argument_serialization_test.rb b/activejob/test/cases/argument_serialization_test.rb
index af3d4f2a8e..7934d8e556 100644
--- a/activejob/test/cases/argument_serialization_test.rb
+++ b/activejob/test/cases/argument_serialization_test.rb
@@ -60,7 +60,7 @@ class ArgumentSerializationTest < ActiveSupport::TestCase
end
assert_raises ActiveJob::SerializationError do
- ActiveJob::Arguments.serialize [ { :a => [{ 2 => 3 }] } ]
+ ActiveJob::Arguments.serialize [ { a: [{ 2 => 3 }] } ]
end
end
diff --git a/activejob/test/support/integration/adapters/resque.rb b/activejob/test/support/integration/adapters/resque.rb
index cb1e376364..a21a1786c9 100644
--- a/activejob/test/support/integration/adapters/resque.rb
+++ b/activejob/test/support/integration/adapters/resque.rb
@@ -1,7 +1,7 @@
module ResqueJobsManager
def setup
ActiveJob::Base.queue_adapter = :resque
- Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.connect(url: "redis://127.0.0.1:6379/12", :thread_safe => true)
+ Resque.redis = Redis::Namespace.new "active_jobs_int_test", redis: Redis.connect(url: "redis://127.0.0.1:6379/12", thread_safe: true)
Resque.logger = Rails.logger
unless can_run?
puts "Cannot run integration tests for resque. To be able to run integration tests for resque you need to install and start redis.\n"
diff --git a/activejob/test/support/integration/adapters/sneakers.rb b/activejob/test/support/integration/adapters/sneakers.rb
index 71e32a3cdd..eb88962578 100644
--- a/activejob/test/support/integration/adapters/sneakers.rb
+++ b/activejob/test/support/integration/adapters/sneakers.rb
@@ -16,16 +16,16 @@ end
module SneakersJobsManager
def setup
ActiveJob::Base.queue_adapter = :sneakers
- Sneakers.configure :heartbeat => 2,
- :amqp => "amqp://guest:guest@localhost:5672",
- :vhost => "/",
- :exchange => "active_jobs_sneakers_int_test",
- :exchange_type => :direct,
- :daemonize => true,
- :threads => 1,
- :workers => 1,
- :pid_path => Rails.root.join("tmp/sneakers.pid").to_s,
- :log => Rails.root.join("log/sneakers.log").to_s
+ Sneakers.configure heartbeat: 2,
+ amqp: "amqp://guest:guest@localhost:5672",
+ vhost: "/",
+ exchange: "active_jobs_sneakers_int_test",
+ exchange_type: :direct,
+ daemonize: true,
+ threads: 1,
+ workers: 1,
+ pid_path: Rails.root.join("tmp/sneakers.pid").to_s,
+ log: Rails.root.join("log/sneakers.log").to_s
unless can_run?
puts "Cannot run integration tests for sneakers. To be able to run integration tests for sneakers you need to install and start rabbitmq.\n"
exit