Sha256: b948ac3d6843d9bebc66792cfda4ff19917d737f6400b08b8f21271167f57b9e
Contents?: true
Size: 562 Bytes
Versions: 31
Compression:
Stored size: 562 Bytes
Contents
require 'test/unit' require 'test_helper' class UtilTest < Test::Unit::TestCase def test_stringify assert_equal "", Rubber::Util::stringify(nil) assert_equal "hi", Rubber::Util::stringify("hi") assert_equal "1", Rubber::Util::stringify(1) assert_equal "3.4", Rubber::Util::stringify(3.4) assert_equal ["1", "2", "r"], Rubber::Util::stringify([1, 2, "r"]) assert_equal({"1" => "2", "three" => "four"}, Rubber::Util::stringify({1 => 2, :three => "four"})) assert_equal [{"3" => "4"}], Rubber::Util::stringify([{3 => 4}]) end end
Version data entries
31 entries across 31 versions & 5 rubygems