rescue event register and implement transition state override
[god.git] / test / test_timeline.rb
blobf42d2041cdd343a7dfacaea50d6a0406a5ae2e54
1 require File.dirname(__FILE__) + '/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