Sha256: 59cf4ead8ae8b333340332def2c7a106b2f836f4d08726be5af31631f7249abc

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

require File.dirname(__FILE__) + '/helper'

class TestTimeline < Test::Unit::TestCase
  def setup
    @timeline = Conditions::Timeline.new(5)
  end
  
  def test_new_should_be_empty
    assert_equal 0, @timeline.size
  end
  
  def test_should_not_grow_to_more_than_size
    (1..10).each do |i|
      @timeline.push(i)
    end
    
    assert_equal [10, 9, 8, 7, 6], @timeline
  end
  
  def test_clear_should_clear_array
    @timeline.push(1)
    assert_equal [], @timeline.clear
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
god-0.1.0 test/test_timeline.rb
god-0.2.0 test/test_timeline.rb
god-0.3.0 test/test_timeline.rb