Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old fixture_path support #2370

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions lib/rspec/rails/fixture_file_upload_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,12 @@ class RailsFixtureFileWrapper
include ActionDispatch::TestProcess if defined?(ActionDispatch::TestProcess)

class << self
attr_reader :fixture_path
attr_accessor :fixture_path

# Get instance of wrapper
def instance
@instance ||= new
end

# Override fixture_path set
# to support Rails 3.0->3.1 using ActionController::TestCase class to resolve fixture_path
# see https://apidock.com/rails/v3.0.0/ActionDispatch/TestProcess/fixture_file_upload
def fixture_path=(value)
if ActionController::TestCase.respond_to?(:fixture_path)
ActionController::TestCase.fixture_path = value
end
@fixture_path = value
end
end
end
end
Expand Down