Commit graph

18 commits

Author SHA1 Message Date
Michael Miller
eade6873e4 Implement ExampleComponent#example_count 2018-10-14 18:37:54 -06:00
Michael Miller
467afd053c Implement iterator version of ExampleGroup#each 2018-10-14 18:29:01 -06:00
Michael Miller
30a45a24d3 Restructure to use a composite design pattern
Examples and example groups now have a common ancestor.
2018-10-14 17:10:12 -06:00
Michael Miller
68412daec0 Remove unused code 2018-10-14 01:02:52 -06:00
Michael Miller
53831ab36a Fix hook flags being nullable 2018-10-10 13:03:47 -06:00
Michael Miller
4948fe0c6f Short-hand syntax for blocks with yield 2018-09-27 18:49:01 -06:00
Michael Miller
1a61235cdc Simplify #examples and #groups methods 2018-09-27 13:51:19 -06:00
Michael Miller
1c7c6e5e90 Initial code for example names 2018-09-23 20:24:28 -06:00
Michael Miller
855a5f2239 Move hook storage to their own class 2018-09-23 15:26:19 -06:00
Michael Miller
94e2f54713 Implement building groups and examples 2018-09-23 14:34:42 -06:00
Michael Miller
66ca06337d Fix locals not being passed to child groups 2018-09-21 14:26:09 -06:00
Michael Miller
a9d4acda36 Pass locals to example and test wrapper initializer
The #initialize method is defined in each context/given/module
that needs to add a local.
This is an elegant (although possibly confusing) solution.
2018-09-21 14:03:09 -06:00
Michael Miller
007572f0b8 Get rid of #add_examples
Added #example_count method to help with array sizing.
2018-09-19 23:13:43 -06:00
Michael Miller
aaf973b8cf Concat #all_examples instead of recursive #add_examples 2018-09-19 22:28:20 -06:00
Michael Miller
4d601281f6 Delay example creation by using factories
The #given block functionality specifically needs this to create 
multiple examples.
2018-09-19 21:58:32 -06:00
Michael Miller
06630e87d3 Rework how children are handled
Uses a loose version of the composite pattern.
This is to keep examples in the order they were declared.
2018-09-19 19:31:50 -06:00
Michael Miller
7968c5a394 Rename Context to ExampleGroup 2018-09-15 10:45:47 -06:00
Michael Miller
0613344230 Scratch work on structure 2018-08-19 01:15:32 -06:00