spec/calculator_spec.rb in dentaku-0.1.1 vs spec/calculator_spec.rb in dentaku-0.1.2
- old
+ new
@@ -50,9 +50,10 @@
calculator.evaluate('foo * 2', 'foo' => 4).should eq(8)
end
describe 'functions' do
it 'should include IF' do
- calculator.evaluate('if (foo < 10, 10, 20)', :foo => 2).should eq(10)
+ calculator.evaluate('if (foo < 8, 10, 20)', :foo => 2).should eq(10)
+ calculator.evaluate('if (foo < 8, 10, 20)', :foo => 9).should eq(20)
end
end
end