Skip to content

Instantly share code, notes, and snippets.

@kinnerapriyap
Last active December 9, 2019 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinnerapriyap/a047f0460f92eb74662dea806894eb60 to your computer and use it in GitHub Desktop.
Save kinnerapriyap/a047f0460f92eb74662dea806894eb60 to your computer and use it in GitHub Desktop.
describe("isPersonRetired") {
describe("when isActive is true") {
beforeEachGroup {
person = person.copy(isActive = true)
}
describe("when getAge is greater than RETIREMENT_AGE") {
beforeEachGroup { person = person.copy(age = 65) }
}
describe("when getAge is less than RETIREMENT_AGE") {
beforeEachGroup { person = person.copy(age = 55) }
}
}
describe("when isActive is false") {
beforeEachGroup {
person = person.copy(isActive = false)
}
describe("when getAge is greater than RETIREMENT_AGE") {
beforeEachGroup { person = person.copy(age = 65) }
}
describe("when getAge is less than RETIREMENT_AGE") {
beforeEachGroup { person = person.copy(age = 55) }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment