'Quick Nimble ios test not running
I'm trying to use Quick & Nimble to test a project but the test is never executed.
I've created a project from scratch using File->New->Project in Xcode. The project is called "MyApp". Then I created a UnitTest target testing "MyApp".
I've added the following Podfile:
use_frameworks!
inhibit_all_warnings!
target 'MyApp' do
# Pods for Test
target "MyAppTests" do
pod 'Quick'
pod 'Nimble'
end
end
I ran "pod install" and everything went well.
Then, I've created a test file:
import Quick
import Nimble
@testable import MyApp
class TestSpec: QuickSpec {
override func spec() {
describe("Describe test") {
context("Context test") {
it("Assertion") {
expect("toto") == "tata"
}
}
}
}
}
Then I ran the test. I expected my test to fail but actually: nothing. It's never executed. Do you guys have any idea why?
Thanks a lot.
Solution 1:[1]
Quick/Nimble test has a related bug for Xcode 13.3. I tested both 13.3 and 13.2.1 and only 13.2.1 can run Nimble tests. Might have to wait for the fix to be merged.
Solution 2:[2]
The bug mentioned here is already fixed, but what I found out is that default version of Quick being installed is 4.0.0. That is unless you tell it a minimum version desired, like this:
pod 'Quick', '~> 5.0.1'
This version has the xcode13.3.1 + Nimble bug fixed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | blyscuit |
Solution 2 | Async- |