Skip to content

Commit 9e7de8c

Browse files
authored
ActionDispatch::TestProcess needs to access :file_fixture_path on Rails 6.1
I had a similar problem to @koenpunt in #2349 where `fixture_file_upload` stopped working. ``` NoMethodError: undefined method `file_fixture_path' for RSpec::Rails::FixtureFileUploadSupport::RailsFixtureFileWrapper:Class Did you mean? fixture_path # /actionpack/lib/action_dispatch/testing/test_process.rb:25:in `fixture_file_upload' # /rspec-rails-dd093928f021/lib/rspec/rails/fixture_file_upload_support.rb:5:in `fixture_file_upload' ``` In my case, it's because I'm on Rails 6.1 alpha. As of [these recent changes]( rails/rails#39086), `ActionController::TestCase` now needs access to `fixture_file_path` within `fixture_file_upload`. There's not currently any CI for Rails 6.1 (as it's not out yet) but I thought I would get a head start on things.
1 parent e5cbfde commit 9e7de8c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/rspec/rails/fixture_file_upload_support.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class RailsFixtureFileWrapper
2323

2424
class << self
2525
attr_reader :fixture_path
26+
attr_reader :file_fixture_path
2627

2728
# Get instance of wrapper
2829
def instance

0 commit comments

Comments
 (0)