1 require File.dirname(__FILE__) + '/helper'
3 class TestConditionsTries < Test::Unit::TestCase
6 def test_valid_should_return_false_if_times_not_set
7 c = Conditions::Tries.new
8 c.watch = stub(:name => 'foo')
9 no_stdout { assert !c.valid? }
14 class TestConditionsTries < Test::Unit::TestCase
16 @c = Conditions::Tries.new
23 def test_prepare_should_create_timeline
24 assert 3, @c.instance_variable_get(:@timeline).instance_variable_get(:@max_size)
29 def test_test_should_return_true_if_called_three_times_within_one_second
37 def test_test_should_return_false_on_fourth_call_if_called_three_times_within_one_second
45 class TestConditionsTriesWithin < Test::Unit::TestCase
47 @c = Conditions::Tries.new
55 def test_test_should_return_true_if_called_three_times_within_one_second
61 def test_test_should_return_false_if_called_three_times_within_two_seconds