From 6ff0b18681d8cbd4c9acb41401f13ef3cd431a51 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 15 Jan 2010 19:00:26 -0800 Subject: a few tokenizer tweeks --- test/test_scalar_scanner.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_scalar_scanner.rb b/test/test_scalar_scanner.rb index 31e3041..eccb2b4 100644 --- a/test/test_scalar_scanner.rb +++ b/test/test_scalar_scanner.rb @@ -16,7 +16,11 @@ class TestScalarScanner < MiniTest::Unit::TestCase def test_scan_date date = '1980-12-16' ss = Psych::ScalarScanner.new date - assert_equal [:DATE, date], ss.tokenize + type, token = ss.tokenize + assert_equal :DATE, type + assert_equal 1980, token.year + assert_equal 12, token.month + assert_equal 16, token.day end def test_scan_inf -- cgit v1.2.3