diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2019-12-05 02:50:45 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2019-12-05 02:50:45 +0300 |
commit | db40701d4d42f44c9db041c9737e4a566be64489 (patch) | |
tree | e633080d83e8ea157704523172116694a26bed49 | |
parent | 4fae71effb3d108fa4d3467210c15b038c974695 (diff) |
Rails test: create tmp directory
-rw-r--r-- | test/support/dummy_rails_integration.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/support/dummy_rails_integration.rb b/test/support/dummy_rails_integration.rb index 9dbc254..c1604b1 100644 --- a/test/support/dummy_rails_integration.rb +++ b/test/support/dummy_rails_integration.rb @@ -17,7 +17,9 @@ module DummyRailsIntegration 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 |