test/test_hash.rb in twibot-0.1.2 vs test/test_hash.rb in twibot-0.1.3

- old
+ new

@@ -1,28 +1,28 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'test_helper')) unless defined?(Twibot) class TestHash < Test::Unit::TestCase - test "should convert string keys to symbols" do + should "convert string keys to symbols" do hash = { "one" => 1, "two" => 2 } hash.symbolize_keys! assert_equal 1, hash[:one] assert_equal 2, hash[:two] assert_nil hash["one"] assert_nil hash["two"] end - test "should convert string keys and preserve symbol keys" do + should "convert string keys and preserve symbol keys" do hash = { "one" => 1, :two => 2 } hash.symbolize_keys! assert_equal 1, hash[:one] assert_equal 2, hash[:two] assert_nil hash["one"] assert_nil hash["two"] end - test "should convert hashes recursively" do + should "convert hashes recursively" do hash = { "one" => 1, :two => { "three" => 3, "four" => 4 } } hash.symbolize_keys! assert_equal 1, hash[:one] assert_equal 3, hash[:two][:three]