Skip to content

Commit

Permalink
Add comment to exmplain type subject offside block (robstoll#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhushikesh committed Oct 12, 2021
1 parent 3216f63 commit 14eb581
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LocalDateExpectationSamples {
// subject inside this block is of type Int (actually 2021)
toEqual(2021)
toBeGreaterThan(2020)
}
} // subject here is back to type LocalDateTime

fails {
expect(LocalDate.of(2021, Month.OCTOBER, 9))
Expand All @@ -36,7 +36,7 @@ class LocalDateExpectationSamples {
notToEqual(2021)
toBeGreaterThan(2022)
toBeLessThan(2020)
}
} // subject here is back to type LocalDateTime
}
}

Expand All @@ -58,15 +58,15 @@ class LocalDateExpectationSamples {
// subject inside this block is of type Int (actually Month.OCTOBER.value i.e. 10)
toEqual(Month.OCTOBER.value)
notToEqual(Month.SEPTEMBER.value)
}
} // subject here is back to type LocalDateTime

fails {
expect(LocalDate.of(2021, Month.OCTOBER, 9))
.month {
// subject inside this block is of type Int (actually Month.OCTOBER.value i.e. 10)
toEqual(Month.SEPTEMBER.value)
notToEqual(Month.OCTOBER.value)
}
} // subject here is back to type LocalDateTime
}
}

Expand All @@ -88,15 +88,15 @@ class LocalDateExpectationSamples {
// subject inside this block is of type DayOfWeek (actually SATURDAY)
toEqual(DayOfWeek.SATURDAY)
notToEqual(DayOfWeek.SUNDAY)
}
} // subject here is back to type LocalDateTime

fails {
expect(LocalDate.of(2021, Month.OCTOBER, 9))
.dayOfWeek {
// subject inside this block is of type DayOfWeek (actually SATURDAY)
toEqual(DayOfWeek.MONDAY)
notToEqual(DayOfWeek.SATURDAY)
}
} // subject here is back to type LocalDateTime
}
}

Expand All @@ -118,15 +118,15 @@ class LocalDateExpectationSamples {
// subject inside this block is of type Int (actually 9)
toEqual(9)
toBeGreaterThan(5)
}
} // subject here is back to type LocalDateTime

fails {
expect(LocalDate.of(2021, Month.OCTOBER, 9))
.day {
// subject inside this block is of type Int (actually 9)
toEqual(5)
toBeLessThan(7)
}
} // subject here is back to type LocalDateTime
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class LocalDateExpectationSamples {
// subject inside this block is of type Int (actually 2021)
it toEqual 2021
it toBeGreaterThan 2020
}
} // subject here is back to type LocalDateTime

fails {
expect(LocalDate.of(2021, Month.OCTOBER, 9)) year {
// subject inside this block is of type Int (actually 2021)
it notToEqual 2021
it toBeGreaterThan 2022
it toBeLessThan 2020
}
} // subject here is back to type LocalDateTime
}
}

Expand All @@ -53,14 +53,14 @@ class LocalDateExpectationSamples {
// subject inside this block is of type Int (actually Month.OCTOBER.value i.e. 10)
it toEqual Month.OCTOBER.value
it notToEqual Month.SEPTEMBER.value
}
} // subject here is back to type LocalDateTime

fails {
expect(LocalDate.of(2021, Month.OCTOBER, 9)) month {
// subject inside this block is of type Int (actually Month.OCTOBER.value i.e. 10)
it toEqual Month.SEPTEMBER.value
it notToEqual Month.OCTOBER.value
}
} // subject here is back to type LocalDateTime
}
}

Expand All @@ -81,14 +81,14 @@ class LocalDateExpectationSamples {
// subject inside this block is of type DayOfWeek (actually SATURDAY)
it toEqual DayOfWeek.SATURDAY
it notToEqual DayOfWeek.SUNDAY
}
} // subject here is back to type LocalDateTime

fails {
expect(LocalDate.of(2021, Month.OCTOBER, 9)) dayOfWeek {
// subject inside this block is of type DayOfWeek (actually SATURDAY)
it toEqual DayOfWeek.MONDAY
it notToEqual DayOfWeek.SATURDAY
}
} // subject here is back to type LocalDateTime
}
}

Expand All @@ -107,14 +107,14 @@ class LocalDateExpectationSamples {
// subject inside this block is of type Int (actually 9)
it toEqual 9
it toBeGreaterThan 5
}
} // subject here is back to type LocalDateTime

fails {
expect(LocalDate.of(2021, Month.OCTOBER, 9)) day {
// subject inside this block is of type Int (actually 9)
it toEqual 5
it toBeLessThan 7
}
} // subject here is back to type LocalDateTime
}
}
}

0 comments on commit 14eb581

Please sign in to comment.