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

Version Path
iostreams-1.10.3 test/utils_test.rb
iostreams-1.10.2 test/utils_test.rb
iostreams-1.10.1 test/utils_test.rb
iostreams-1.10.0 test/utils_test.rb
iostreams-1.9.0 test/utils_test.rb
iostreams-1.8.0 test/utils_test.rb
iostreams-1.7.0 test/utils_test.rb
iostreams-1.6.2 test/utils_test.rb
iostreams-1.6.1 test/utils_test.rb
iostreams-1.6.0 test/utils_test.rb
iostreams-1.5.1 test/utils_test.rb
iostreams-1.5.0 test/utils_test.rb
iostreams-1.4.0 test/utils_test.rb
iostreams-1.3.3 test/utils_test.rb
iostreams-1.3.2 test/utils_test.rb
iostreams-1.3.1 test/utils_test.rb
iostreams-1.3.0 test/utils_test.rb
iostreams-1.2.1 test/utils_test.rb
iostreams-1.2.0 test/utils_test.rb
iostreams-1.1.1 test/utils_test.rb