test/test_dir_items.rb in zold-0.31.5 vs test/test_dir_items.rb in zold-0.31.6
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-# Copyright (c) 2018-2023 Zerocracy, Inc.
+# Copyright (c) 2018-2023 Zerocracy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -41,12 +41,10 @@
Zold::DirItems.new(dir).fetch
end
end
Threads.new(100).assert do
start = Time.now
- File.open(file, 'w+') do |f|
- f.write('test')
- end
+ File.write(file, 'test')
test_log.info("Saved in #{Zold::Age.new(start)}")
sleep 1
end
back.kill
end