Skip to content

Commit

Permalink
Merge pull request #2370 from rspec/remove-fixture-file-hack
Browse files Browse the repository at this point in the history
Remove old fixture_path support
  • Loading branch information
JonRowe committed Dec 26, 2020
1 parent dbb7362 commit f5edf18
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/rspec/rails/fixture_file_upload_support.rb
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

0 comments on commit f5edf18

Please sign in to comment.