Sha256: 9dfc8b940cfc6589b6ca81f483ff196302e0af8627534ca92ed1cc6507935756
Contents?: true
Size: 598 Bytes
Versions: 14
Compression:
Stored size: 598 Bytes
Contents
require 'rubygems' gem 'test-unit' 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
14 entries across 14 versions & 3 rubygems