If you are creating specs comparing BigDecimals to a hard coded float value, you may find that some comparisons just dont work even when the numbers are supposedly the same (see Floating point accuracy problems)
‘total invoiced amount should be 100.15′ FAILED
expected: 10.15,
got: 10.15 (using ==)
What we are testing is the value and the type, the correct way of achieving this may be…
If you want to round the big decimal to a float with 2 decimal places you could also use