diff options
author | murphy <murphy@rubychan.de> | 2010-06-29 06:39:21 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-06-29 06:39:21 +0000 |
commit | e63682824ef4110152381bdb9b831378fe7baa4c (patch) | |
tree | cb28a1fc6ec57c51346ff2de4e390c7c417fb257 /lib/coderay/duo.rb | |
parent | c66ba1145eea6b846cc9f7427c740df5aada6436 (diff) | |
download | coderay-e63682824ef4110152381bdb9b831378fe7baa4c.tar.gz |
Removing tests from library files. They live now in test/unit.
Diffstat (limited to 'lib/coderay/duo.rb')
-rw-r--r-- | lib/coderay/duo.rb | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/lib/coderay/duo.rb b/lib/coderay/duo.rb index d8b064d..55d1277 100644 --- a/lib/coderay/duo.rb +++ b/lib/coderay/duo.rb @@ -1,4 +1,3 @@ -($:.unshift '..'; require 'coderay') unless defined? CodeRay module CodeRay # = Duo @@ -80,55 +79,3 @@ module CodeRay end end - -if $0 == __FILE__ - $VERBOSE = true - $: << File.join(File.dirname(__FILE__), '..') - eval DATA.read, nil, $0, __LINE__ + 4 -end - -__END__ -require 'test/unit' - -class DuoTest < Test::Unit::TestCase - - def test_two_arguments - duo = CodeRay::Duo[:ruby, :html] - assert_kind_of CodeRay::Scanners[:ruby], duo.scanner - assert_kind_of CodeRay::Encoders[:html], duo.encoder - end - - def test_two_hash - duo = CodeRay::Duo[:ruby => :html] - assert_kind_of CodeRay::Scanners[:ruby], duo.scanner - assert_kind_of CodeRay::Encoders[:html], duo.encoder - 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 - end - -end |