summaryrefslogtreecommitdiff
path: root/test/test_scalar_scanner.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-01-15 19:00:26 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-01-15 19:00:26 -0800
commit6ff0b18681d8cbd4c9acb41401f13ef3cd431a51 (patch)
treef1067eccdac3dd29c8dc4a36d2bbdd8df83fdca6 /test/test_scalar_scanner.rb
parent8ebbfa2df1c49e35b10f50de13af8886647bb185 (diff)
downloadpsych-6ff0b18681d8cbd4c9acb41401f13ef3cd431a51.zip
a few tokenizer tweeks
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