Jak pisać testy z dobrą fabułą
class JugMeeting extends Specification { def jugMeeting = new Meeting(["Spock", "Gerrit"]) def attendee = new Person("John") def "JUG meeting on 23.07.2014 should be a success"() { given:
attendee.setKnownFrameworks(["JUnit", "Mockito"])
attendee.setMoodPercent(20) when: attendee.attend(jugMeeting) then: attendee.moodPercent > 80 attendee.knowFrameworks.contains("Spock") attendee.isAwake } }