Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid default filename clashes by making timestamp in filename accura…

…te to 1/100th second
  • Loading branch information...
commit 24d89663525fefcfd37bacdf1793a223e8d068c4 1 parent 0e5b485
@mocoso authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/cucumber_screenshot/world.rb
View
2  lib/cucumber_screenshot/world.rb
@@ -9,7 +9,7 @@ def base_screenshot_directory_name
"#{RAILS_ROOT}/features/screenshots"
end
- def screenshot(directory_name = base_screenshot_directory_name, file_name = "screenshot-#{Time.now.to_i}")
+ def screenshot(directory_name = base_screenshot_directory_name, file_name = "screenshot-#{(Time.now.to_f * 100).to_i}")
FileUtils.mkdir_p("#{directory_name}/html")
html_file_name = "#{directory_name}/html/#{file_name}.html"
Please sign in to comment.
Something went wrong with that request. Please try again.