After running my RSpec tests I frequently get output like this:
expected: 50
     got: #<BigDecimal:7fbdcd1b5408,'0.22E3',9(36)>
How can I find out what number RSpec actually got?
Thanks for any help.
As @jcm commented, It's 220. (= 0.22 * 103)
require 'bigdecimal'
BigDecimal.new(220) # => #<BigDecimal:3037368,'0.22E3',9(36)>
BigDecimal.new(220) == 220 # => true
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With