Autofix Rubocop Rails/RootPathnameMethods (#23760)
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -73,11 +73,11 @@ end
|
||||
RSpec::Matchers.define_negated_matcher :not_change, :change
|
||||
|
||||
def request_fixture(name)
|
||||
File.read(Rails.root.join('spec', 'fixtures', 'requests', name))
|
||||
Rails.root.join('spec', 'fixtures', 'requests', name).read
|
||||
end
|
||||
|
||||
def attachment_fixture(name)
|
||||
File.open(Rails.root.join('spec', 'fixtures', 'files', name))
|
||||
Rails.root.join('spec', 'fixtures', 'files', name).open
|
||||
end
|
||||
|
||||
def stub_jsonld_contexts!
|
||||
|
Reference in New Issue
Block a user