1 2 3 4 5 6 7 8 9 10 11 12 13 14
require 'test/unit' require 'coderay' class TextTest < 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