Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (21 sloc) 1.059 kb

Copy

  • Titles and navigation links should only capitalise first letter, not every word.
  • URLs should use hyphens, not underscores.

Code

  • Don't commit additional whitespace
  • Use ruby 1.9.2 hash syntax wherever possible
  • Models should have:
    • All associations at the top
    • Then any scopes
    • Then validations
    • Then code

Testing

Cucumber

  • Only test the "happy path" behaviour, not exceptional behaviour.
  • Only describe things that should happen, not things that shouldn't.
  • Prefer large descriptive steps to small reusable ones. DRY can be achieved at the Ruby level.
  • Prefer steps written at a high level of abstraction.
  • Write steps to be independent, not relying on the user being on a certain page.
  • Avoid testing negatives; these are better tested in functional/unit tests.
  • Avoid testing incidental behaviour (e.g. flash messages); these are better tested in functional/unit tests.
  • Never call a cucumber step from within another one; extract the behaviour into a method which can be called from both.
Jump to Line
Something went wrong with that request. Please try again.