summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2011-06-11 17:30:47 +0000
committermurphy <murphy@rubychan.de>2011-06-11 17:30:47 +0000
commit14949dbd45fb61540e2bdc1db281312c98d55cff (patch)
tree7222c8450309c2314f5c4b2c68d9446b5bd4c1c0 /test
parent15f9e0a2e3ef375cca5195a0da5086de50312517 (diff)
downloadcoderay-14949dbd45fb61540e2bdc1db281312c98d55cff.tar.gz
make Duo test independent of YAML engine
Diffstat (limited to 'test')
-rw-r--r--test/unit/duo.rb28
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>&quot;</delimiter><content>pass</content><delimiter>&quot;</delimiter></string></coderay-tokens>
+ XML
end
end