Class: ODDB::TestFormat

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
test/test_model/text.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



47
48
49
# File 'test/test_model/text.rb', line 47

def setup
  @format = ODDB::Text::Format.new
end

- (Object) test_end_writer



63
64
65
66
67
68
69
# File 'test/test_model/text.rb', line 63

def test_end_writer
  @format.end = 7
  assert_nothing_raised {
    @format.range
  }
  assert_equal(0..7, @format.range)
end

- (Object) test_initialize



50
51
52
53
54
55
# File 'test/test_model/text.rb', line 50

def test_initialize
  assert_nothing_raised {
    @format.range
  }
  assert_equal(0..-1, @format.range)
end

- (Object) test_start_writer



56
57
58
59
60
61
62
# File 'test/test_model/text.rb', line 56

def test_start_writer
  @format.start = 3
  assert_nothing_raised {
    @format.range
  }
  assert_equal(3..-1, @format.range)
end