I have just completed migrating a Rails app from CircleCI 1.0 to 2.0, and have got all tests successfully passing.
All but one!
Failure/Error: attach_file 'file', File.join(Rails.root, 'spec', 'support', 'images', 'test_image.jpg'), visible: false Selenium::WebDriver::Error::ExpectedError: invalid argument: File not found : /home/circleci/project/spec/support/images/test_image.jpg
test_image.jpg does exist, it is used by other specs that are successfully passing.
From the test output, it seems that selenium is looking in
home/circleci/project rather than the Rails root folder.
Has anyone else encountered a similar issue? Is the test looking for the file in the wrong directory, or is this just how Circle 2.0 does things? How can I resolve this issue?