summaryrefslogtreecommitdiff
path: root/test/test_scalar_scanner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_scalar_scanner.rb')
-rw-r--r--test/test_scalar_scanner.rb6
1 files changed, 5 insertions, 1 deletions
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