assert_equal not evaluating to TRUE

You're working with floats, which you can't reliably compare with ==. Check out assert_in_delta instead.