Unit tests (Quick / Nimble) - (tests not found)

I have a problem with unit testing. When I run the tests, it ends "No tests found". I use the frame AppCodeand Quick/Nimbleunit testing, but it also does not work in XCode.

I have XCTest/Kiwito run the configuration using Target: MyAppTests, Configuration: Development and Class: all test classes (this does not work even with a specific concrete test class). To my knowledge, nothing more configured.

Any ideas what I'm doing wrong? I am not sure what other type of information / configuration I should provide .. thanks

Edit: Unit test code example

import Quick
import Nimble
@testable import FigurePOS

class DateFormatterTest: QuickSpec
{
    override func spec()
    {
        describe("formatting dates") {
            it("should print correct date") {

                var c = DateComponents()
                c.year = 2016
                c.month = 5
                c.day = 24
                c.hour = 4
                c.minute = 33
                c.second = 12

                let gregorian = NSCalendar(identifier: .gregorian)!
                let date = gregorian.date(from: c)!

                expect(DateFormatter.formatGmt(date)).to(equal("2016-05-24T04:33:12Z"))
            }
        }
    }
}
+4
3

Quick + Nimble. .

, . Targets > AppTests > Build Phrases. , DateFormatterTest Compile Sources.

: enter image description here

+2

. , , , , , :

spec() super.spec() .

0

setUp() tearDown(), testSpec(). "" . .

-2

Source: https://habr.com/ru/post/1660681/


All Articles