diff --git a/test/fbe/test_award.rb b/test/fbe/test_award.rb index b761da8..59842de 100644 --- a/test/fbe/test_award.rb +++ b/test/fbe/test_award.rb @@ -81,6 +81,7 @@ def test_simple def test_some_terms { '(let x 25)' => 0, + '(award (give (times 5 0.25 "fun")))' => 1, '(award (give 25 "for being a good boy"))' => 25, '(award (give (between 42 -10 -50) "empty"))' => -10, '(award (give (between -3 -10 -50) "empty"))' => 0, @@ -91,6 +92,16 @@ def test_some_terms end end + def test_some_greetings + { + '(award (give (times 5 0.25 "fun")))' => 'You\'ve earned +1 points. ', + '(award (give 25 "for being a good boy"))' => 'You\'ve earned +25 points. ' + }.each do |q, v| + a = Fbe::Award.new(q) + assert_equal(v, a.bill.greeting, q) + end + end + def test_must_not_give_anything_when_too_small_value { '(award (give (between 0 5 20)))' => 0,