My project is written in Swift 2.0 and I use Quick & Nimble to test my code.
expect(workerSpy.buySharesQuantity).to(equal(0.9602))
What I get is expectation failure with error message
expected to equal <0.9602>, got <0.9602>
Definition of buySharesQuantity
var buySharesQuantity: Double = 0.0
Does anyone have an idea why?
You should use beCloseTo
instead of equal
More about it why here
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