Slide 13
Slide 13 text
class SpecA: QuickSpec {
override class func spec() {
describe("A") {
print("A.describe")
let date = Date() // beforeEachΛΘͳ͍ྫ
it("actionϝιου1ඵҎʹ࣮ߦ͕ྃ͢Δ") {
print("A.it")
let subject = ...
subject.action()
expect(date - Date()) < 1.0 // ྫ
}
}
}
}
class SpecB: QuickSpec {
override class func spec() {
describe(“B") {
print("B.describe")
it(“…”) {
print("B.it")
}
}
}
}
A.describe
B.describe
A.it
B.it
it࠷ޙʹ࣮ߦ͞ΕΔ
• SpecAͷspecϝιου͕࣮ߦ͞ΕΔ
• SpecAͷdescribe͕࣮ߦ͞ΕΔ
• SpecBͷspecϝιου͕࣮ߦ͞ΕΔ
• SpecBͷdescribe͕࣮ߦ͞ΕΔ
• SpecAͷit͕࣮ߦ͞ΕΔ
• SpecBͷit͕࣮ߦ͞ΕΔ
print ݁Ռ