added more to site docs
[god.git] / test / test_timeline.rb
blob89351739e6914610a18253efa20179fb1aef1d48
1 require 'helper'
3 class TestTimeline < Test::Unit::TestCase
4   def setup
5     @timeline = Conditions::Timeline.new(5)
6   end
7   
8   def test_new_should_be_empty
9     assert_equal 0, @timeline.size
10   end
11   
12   def test_should_not_grow_to_more_than_size
13     (1..10).each do |i|
14       @timeline.push(i)
15     end
16     
17     assert_equal [10, 9, 8, 7, 6], @timeline
18   end
19   
20   def test_clear_should_clear_array
21     @timeline.push(1)
22     assert_equal [], @timeline.clear
23   end
24 end