Skip to content

Commit 310772f

Browse files
author
Laurent Cobos
committed
add some doc
1 parent 0c3a0f5 commit 310772f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/rspec/rails/fixture_file_upload_support.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ def fixture_path
1414
@fixture_path ||= calculate_path
1515
end
1616

17+
# overrided accessor to support Rails 3.0..3.1
18+
# because of ActionController::TestCase class to resolve fixture_path
19+
# see https://apidock.com/rails/v3.0.0/ActionDispatch/TestProcess/fixture_file_upload
1720
def fixture_path=(value)
18-
# Rails 3.0..3.1 are using ActionController::TestCase class to resolve fixture_path
19-
# see https://apidock.com/rails/v3.0.0/ActionDispatch/TestProcess/fixture_file_upload
2021
if ActionController::TestCase.respond_to?(:fixture_path)
2122
ActionController::TestCase.fixture_path = value
2223
end

0 commit comments

Comments
 (0)