blob: ad61291a3db03ae8667cab253ed5b2727760adf6 (
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_with(:count)
end
end
|