diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-02-21 19:57:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 09:57:15 +0900 |
commit | 8fd3fc404dd848253767252bbd76275e091832b1 (patch) | |
tree | 05dac486f88021edebe5c27edc8466f1484e9114 /spec/fabricators | |
parent | 48aeab90f657055e5516b844f47fcf5c097458a1 (diff) |
Autofix Rubocop Rails/RootPathnameMethods (#23760)
Diffstat (limited to 'spec/fabricators')
-rw-r--r-- | spec/fabricators/custom_emoji_fabricator.rb | 2 | ||||
-rw-r--r-- | spec/fabricators/site_upload_fabricator.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/fabricators/custom_emoji_fabricator.rb b/spec/fabricators/custom_emoji_fabricator.rb index 298a50b4b..fa570eec6 100644 --- a/spec/fabricators/custom_emoji_fabricator.rb +++ b/spec/fabricators/custom_emoji_fabricator.rb @@ -3,5 +3,5 @@ Fabricator(:custom_emoji) do shortcode 'coolcat' domain nil - image { File.open(Rails.root.join('spec', 'fixtures', 'files', 'emojo.png')) } + image { Rails.root.join('spec', 'fixtures', 'files', 'emojo.png').open } end diff --git a/spec/fabricators/site_upload_fabricator.rb b/spec/fabricators/site_upload_fabricator.rb index b6841dea3..ad1b777cc 100644 --- a/spec/fabricators/site_upload_fabricator.rb +++ b/spec/fabricators/site_upload_fabricator.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true Fabricator(:site_upload) do - file { File.open(File.join(Rails.root, 'spec', 'fabricators', 'assets', 'utah_teapot.png')) } + file { Rails.root.join('spec', 'fabricators', 'assets', 'utah_teapot.png').open } end |