Skip to content

Commit

Permalink
Add make function for vehicle
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan committed May 9, 2019
1 parent 376f52d commit 4219618
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Fakery/Generators/Vehicle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ public final class Vehicle: Generator {
public func manufacture() -> String {
return generate("vehicle.manufacture")
}

public func make() -> String {
return generate("vehicle.makes")
}
}
7 changes: 7 additions & 0 deletions Tests/Fakery/Generators/VehicleSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ final class VehicleSpec: QuickSpec {
expect(manufacture).to(equal("Volkswagen"))
}
}

describe("#make") {
it("returns the correct make") {
let make = vehicle.make()
expect(make).to(equal("BMW"))
}
}
}
}
}

0 comments on commit 4219618

Please sign in to comment.