Sha256: 08ef9e05c7180afc5d3f40b750e5516824df48d2fc489b30a6a243ea769a1e23
Contents?: true
Size: 626 Bytes
Versions: 20
Compression:
Stored size: 626 Bytes
Contents
require_relative "test_helper" class UtilsTest < Minitest::Test describe IOStreams::Utils do describe ".temp_file_name" do it "returns value from block" do result = IOStreams::Utils.temp_file_name("base", ".ext") { |_name| 257 } assert_equal 257, result end it "supplies new temp file_name" do file_name = nil file_name2 = nil IOStreams::Utils.temp_file_name("base", ".ext") { |name| file_name = name } IOStreams::Utils.temp_file_name("base", ".ext") { |name| file_name2 = name } refute_equal file_name, file_name2 end end end end
Version data entries
20 entries across 20 versions & 1 rubygems