DEV: Use dynamic/static fabricator attrs correctly (#9519)

DEV: Use dynamic/static fabricator attrs correctly (#9519)

diff --git a/spec/fabricators/post_fabricator.rb b/spec/fabricators/post_fabricator.rb
index cd18b78..412504c 100644
--- a/spec/fabricators/post_fabricator.rb
+++ b/spec/fabricators/post_fabricator.rb
@@ -20,7 +20,7 @@ end
 
 Fabricator(:old_post, from: :post) do
   topic { |attrs| Fabricate(:topic, user: attrs[:user], created_at: (DateTime.now - 100)) }
-  created_at (DateTime.now - 100)
+  created_at { 100.days.ago }
 end
 
 Fabricator(:moderator_post, from: :post) do
diff --git a/spec/fabricators/topic_fabricator.rb b/spec/fabricators/topic_fabricator.rb
index 8fc0307..3bcee07 100644
--- a/spec/fabricators/topic_fabricator.rb
+++ b/spec/fabricators/topic_fabricator.rb
@@ -9,7 +9,7 @@ Fabricator(:topic) do
 end
 
 Fabricator(:deleted_topic, from: :topic) do
-  deleted_at Time.now
+  deleted_at { 1.minute.ago }
 end
 
 Fabricator(:closed_topic, from: :topic) do
diff --git a/spec/fabricators/topic_timer_fabricator.rb b/spec/fabricators/topic_timer_fabricator.rb
index 99bacf7..56e3bba 100644
--- a/spec/fabricators/topic_timer_fabricator.rb
+++ b/spec/fabricators/topic_timer_fabricator.rb
@@ -3,6 +3,6 @@
 Fabricator(:topic_timer) do
   user
   topic
-  execute_at Time.zone.now + 1.hour
+  execute_at { 1.hour.from_now }
   status_type TopicTimer.types[:close]
 end
diff --git a/spec/fabricators/upload_fabricator.rb b/spec/fabricators/upload_fabricator.rb
index 72bcb6c..c2f6952 100644
--- a/spec/fabricators/upload_fabricator.rb
+++ b/spec/fabricators/upload_fabricator.rb
@@ -45,7 +45,7 @@ Fabricator(:video_upload, from: :upload) do
 end
 
 Fabricator(:secure_upload, from: :upload) do
-  secure { true }
+  secure true
   sha1 { SecureRandom.hex(20) }
   original_sha1 { sequence(:sha1) { |n| Digest::SHA1.hexdigest(n.to_s) } }
 end
@@ -67,7 +67,7 @@ Fabricator(:upload_s3, from: :upload) do
 end
 
 Fabricator(:secure_upload_s3, from: :upload_s3) do
-  secure { true }
+  secure true
   sha1 { SecureRandom.hex(20) }
   original_sha1 { sequence(:sha1) { |n| Digest::SHA1.hexdigest(n.to_s) } }
 end
diff --git a/spec/fabricators/watched_word_fabricator.rb b/spec/fabricators/watched_word_fabricator.rb
index b3796ca..521cb2f 100644
--- a/spec/fabricators/watched_word_fabricator.rb
+++ b/spec/fabricators/watched_word_fabricator.rb
@@ -2,5 +2,5 @@
 
 Fabricator(:watched_word) do
   word { sequence(:word) { |i| "word#{i}" } }
-  action { WatchedWord.actions[:block] }
+  action WatchedWord.actions[:block]
 end
diff --git a/spec/fabricators/web_crawler_request_fabricator.rb b/spec/fabricators/web_crawler_request_fabricator.rb
index 2d2be02..a20ab42 100644
--- a/spec/fabricators/web_crawler_request_fabricator.rb
+++ b/spec/fabricators/web_crawler_request_fabricator.rb
@@ -2,6 +2,6 @@
 
 Fabricator(:web_crawler_request) do
   user_agent { sequence(:ua) { |i| "Googlebot #{i}.0" } }
-  date Time.zone.now.to_date
+  date { Time.zone.now.to_date }
   count 0
 end

GitHub sha: 8adccaf9

This commit appears in #9519 which was approved by eviltrout. It was merged by CvX.