diff options
author | murphy <murphy@rubychan.de> | 2011-06-11 17:30:47 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2011-06-11 17:30:47 +0000 |
commit | 14949dbd45fb61540e2bdc1db281312c98d55cff (patch) | |
tree | 7222c8450309c2314f5c4b2c68d9446b5bd4c1c0 | |
parent | 15f9e0a2e3ef375cca5195a0da5086de50312517 (diff) | |
download | coderay-14949dbd45fb61540e2bdc1db281312c98d55cff.tar.gz |
make Duo test independent of YAML engine
-rw-r--r-- | test/unit/duo.rb | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/test/unit/duo.rb b/test/unit/duo.rb index a433c3e..e7f3f91 100644 --- a/test/unit/duo.rb +++ b/test/unit/duo.rb @@ -16,30 +16,10 @@ class DuoTest < Test::Unit::TestCase end def test_call - duo = CodeRay::Duo[:python => :yaml] - assert_equal <<-'YAML', duo.call('def test: "pass"') ---- -- - def - - :keyword -- - " " - - :space -- - test - - :method -- - ":" - - :operator -- - " " - - :space -- - :begin_group - - :string -- - "\"" - - :delimiter -- - pass - - :content -- - "\"" - - :delimiter -- - :end_group - - :string - YAML + duo = CodeRay::Duo[:python => :xml] + assert_equal <<-'XML'.chomp, duo.call('def test: "pass"') +<?xml version='1.0'?><coderay-tokens><keyword>def</keyword> <method>test</method><operator>:</operator> <string><delimiter>"</delimiter><content>pass</content><delimiter>"</delimiter></string></coderay-tokens> + XML end end |