File: content.rb

package info (click to toggle)
gonzui 1.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,824 kB
  • ctags: 1,448
  • sloc: ruby: 9,570; sh: 5,684; ansic: 1,334; lex: 1,140; makefile: 466; perl: 205; ml: 131
file content (19 lines) | stat: -rwxr-xr-x 390 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/env ruby
$LOAD_PATH.unshift("..")
require 'test/unit'
require 'gonzui'
require 'test-util'

include Gonzui

class ContentTest < Test::Unit::TestCase
  def test_content
    text = "foo"
    mtime = Time.now
    content = Content.new(text, mtime)
    assert_equal(text, content.text)
    assert_equal(text.length, content.length)
    assert_equal(mtime, content.mtime)
  end
end