Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2019-12-05 02:50:45 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2019-12-05 02:50:45 +0300
commitdb40701d4d42f44c9db041c9737e4a566be64489 (patch)
treee633080d83e8ea157704523172116694a26bed49
parent4fae71effb3d108fa4d3467210c15b038c974695 (diff)
Rails test: create tmp directory
-rw-r--r--test/support/dummy_rails_integration.rb4
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