summaryrefslogtreecommitdiff
path: root/test/unit/count.rb
blob: 448e8f17915a23a309542684e27bc0868cf18548 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'test/unit'
require 'coderay'

class CountTest < Test::Unit::TestCase
  
  def test_count
    tokens = CodeRay.scan <<-RUBY.strip, :ruby
#!/usr/bin/env ruby
# a minimal Ruby program
puts "Hello world!"
    RUBY
    assert_equal 11, tokens.encode(:count)
  end
  
end