Skip to content

Expand guides on writing specs #45

Open
@yorickpeterse

Description

@yorickpeterse

Currently the guides on writing specs are really quite basic. One of the most common problems I currently face is dealing with pull-requests that add specs that don't go for the full 100%. In almost all cases this problem can be broken into two categories:

  1. Spec descriptions are too short (e.g. it "returns X" vsit "returns X when given an instance of Y"`).
  2. Example blocks are far too big instead of only containing the bare minimum needed to test certain behaviour.

The old RubySpec website had a pretty decent guide on writing specs and I think we should re-use that in some shape or form. What it should at least cover:

  1. Where certain specs go (this isn't always clear when just searching for similar code)
  2. How to write good spec descriptions
  3. Some techniques on cutting down the size of example blocks (and why)
  4. How to tag specs/remove tags
  5. How to deal with complex setup code
  6. The importance of all of the above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions