./lib/coderay/encoders/text.rb in coderay-1.0.0.598.pre vs ./lib/coderay/encoders/text.rb in coderay-1.0.0.738.pre

- old
+ new

@@ -1,6 +1,5 @@ -($:.unshift '../..'; require 'coderay') unless defined? CodeRay module CodeRay module Encoders # Concats the tokens into a single string, resulting in the original # code string if no tokens were removed. @@ -22,11 +21,11 @@ DEFAULT_OPTIONS = { :separator => nil } def text_token text, kind - @out << text + super @out << @sep if @sep end protected def setup options @@ -40,26 +39,5 @@ end 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 CountTest < Test::Unit::TestCase - - def test_count - ruby = <<-RUBY -puts "Hello world!" - RUBY - tokens = CodeRay.scan ruby, :ruby - assert_equal ruby, tokens.encode_with(:text) - end - -end \ No newline at end of file