Implement #described_class

This commit is contained in:
Michael Miller 2018-09-04 16:59:59 -06:00
parent 7ff91b4fc6
commit f7eeb2b2a3
2 changed files with 7 additions and 1 deletions

View file

@ -88,7 +88,7 @@ In no particular order, features that have been implemented and are planned:
- [ ] DSL
- [X] `describe` and `context` blocks
- [ ] Contextual values with `let`, `let!`, `subject`, `described_class`
- [X] Contextual values with `let`, `let!`, `subject`, `described_class`
- [ ] Test multiple and generated values - `given`
- [ ] Before and after hooks - `before_each`, `before_all`, `after_each`, `after_all`, `around_each`
- [ ] One-liner syntax

View file

@ -17,6 +17,12 @@ module Spectator
module Locals
include {{parent_locals_module.id}}::Locals
{% if what.is_a?(Path) %}
def described_class
{{what}}
end
{% end %}
end
{{block.body}}