Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boardfish/idiomatic_rspec
https://github.com/boardfish/idiomatic_rspec
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/boardfish/idiomatic_rspec
- Owner: boardfish
- Created: 2022-07-20T10:04:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-20T10:17:02.000Z (over 2 years ago)
- Last Synced: 2024-10-22T08:27:22.038Z (2 months ago)
- Language: Ruby
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Idiomatic RSpec
This code accompanies a talk I'm planning on how to leverage RSpec's features to
write tests cleanly. It uses:- `let`
- `context`
- `describe`
- `subject`
- `shared_context` and `include_context`
- `described_class`, and
- implicit subject syntax.This is all done with the aim of extracting setup outside your tests, so that
your tests can be responsible for calling `subject` only in the desired
conditions.Step through the Git history to see how this changes at each step and how each
of RSpec's features helps to clean things up.