Skip to content

Commit

Permalink
Rails test: create tmp directory
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Dec 4, 2019
1 parent 4fae71e commit db40701
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/support/dummy_rails_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def teardown

def screenshot!
path = "tmp/#{name}.png"
page.driver.render(File.join(GEM_PATH, path), full: true)
full_path = File.join(GEM_PATH, path)
FileUtils.mkdir_p(File.dirname(full_path))
page.driver.render(full_path, full: true)
STDERR.puts "Screenshot saved to #{path}"
end

Expand Down

0 comments on commit db40701

Please sign in to comment.