(:fixture_path)
Rack::Test::UploadedFile.new("#{fixture_path}#{path}",
mime_type, binary)
end
it’s trying to get the fixturePath from self.class ( Article in this
case) which doesn’t respond to fixture_path
however the correct path is given by
ActionController::TestCase.fixture_path
so using the trick:
photo { fixture_file_upload
“#{ActionController::TestCase.fixture_path}files/test.jpg”, ‘image/
jpg’ }
runs well… but I guess it’s just a trick, the ‘truth’ is somewhere
else … ?
how can I relate the fixture_path with the self.class
thanks for your feedback
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.