I'm trying to do a simple test to see if Quick and Nimble are working properly, but they're not. Here is my simple test which is supposed to break:
import Quick
import Nimble
class SomeSpec: QuickSpec {
override func spec() {
describe("bad test") {
it("does not pass") {
expect("good").to(equal("bad"))
}
}
}
}
But if I run the test, I'll see output:
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.004) seconds
I don't know why zero tests are being run. I did install Quick and Nimble with Swift Package Manager instead of Cocoapods, if that might be a reason for the problem.
To anyone still having an issue, it's already addressed in the latest Quick release - but unless you point version, default pod install
installs Quick 4.0.0, while version 5.0.1 is already available. So add this to the podfile:
pod 'Quick', '~> 5.0.1'
and it should work.
It sounds like the test class is not part of the test target, therefore it's not being run. Try deleting and re-adding it as per 'Xcode Help > Add a test class to a project'.
And here are the steps to run this test successfully in a brand new project:
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