Commit graph

72 commits

Author SHA1 Message Date
Michael Miller
837e4cb85d
Implement Indexable(Node) on ExampleGroup 2021-08-17 12:54:36 -06:00
Michael Miller
841efc236d
Fix flipped append/prepend of "after" hooks 2021-08-08 10:27:34 -06:00
Michael Miller
b9f0a31a4a
Overhaul hooks
Mostly cleanup and make managing hooks simpler, hopefully.
Tests indicate this configuration matches hook execution order of RSpec.
2021-08-07 21:45:49 -06:00
Michael Miller
937b084f66
Support defining hooks in configuration block 2021-07-17 15:20:58 -06:00
Michael Miller
1f91836de1
Use block to create examples
Seems that nodes can't be duped/cloned easily.
2021-06-13 14:45:01 -06:00
Michael Miller
04d6c70f59
Cleaner distinction between metadata and tags 2021-06-12 16:45:45 -06:00
Michael Miller
b9d77321b3
Fix premature call of after_all hook 2021-06-05 22:44:34 -06:00
Michael Miller
aee171656a
Fix '<anonymous>' showing up for root group 2021-05-16 19:37:45 -06:00
Michael Miller
d292c01e74
Remove direct references to Example in ExampleGroup 2021-05-08 12:43:41 -06:00
Michael Miller
ef7fca3f95
Bit of cleanup around parent/group 2021-05-08 12:10:27 -06:00
Michael Miller
d7ba47cc49
Clean up hook code 2021-05-08 12:00:29 -06:00
Michael Miller
e47e625016
Remove circular dependency with Node and ExampleGroup 2021-05-07 21:04:17 -06:00
Michael Miller
6bea36d8b6
Move Node out of Spec namespace 2021-05-07 20:09:33 -06:00
Michael Miller
ff49c674c6
Fix around_each hook ordering when at the same level 2021-01-30 21:15:20 -07:00
Michael Miller
b7ed4ec14c
Nest spec types 2021-01-21 00:03:39 -07:00
Michael Miller
73dc7ae811
Fix copy/paste docs 2021-01-16 17:16:31 -07:00
Michael Miller
cd519178ac
Remove whitespace 2021-01-16 16:52:41 -07:00
Michael Miller
36c2a5d368
Logic for around_each hooks 2021-01-16 16:28:33 -07:00
Michael Miller
2e8036d230
Move instance variable 2021-01-09 12:48:53 -07:00
Michael Miller
c4289b82da
Better trace message for initial hook processing 2021-01-09 11:33:29 -07:00
Michael Miller
def66acc15
Trace hook invocation 2021-01-09 11:14:27 -07:00
Michael Miller
7d0ba752e9
Change ExampleNode to SpecNode 2021-01-09 10:39:04 -07:00
Michael Miller
2f4cbd9c33
Specify contents of event trigger method with macro block
Implement calling parent group hooks.
2020-11-15 11:22:52 -07:00
Michael Miller
f433405ece
Scratch work
Trying to implement hooks. Ran into a problem with contexts.
2020-11-08 15:06:49 -07:00
Michael Miller
4974054de7
Some code to run a spec 2020-10-17 11:23:51 -06:00
Michael Miller
98f886d9d4
Implement finished? method 2020-09-12 16:02:11 -06:00
Michael Miller
3f7e0d7882
Add missing require statement 2020-09-05 19:55:46 -06:00
Michael Miller
fbf574b0b9
Create ExampleGroup and use shared ExampleNode type 2020-09-05 16:47:40 -06:00
Michael Miller
55900ebecd
Initial rework of example type structure 2020-09-05 15:01:22 -06:00
Michael Miller
8c180e818f Merge remote-tracking branch 'origin/release/0.9' into mocks-and-doubles 2019-09-27 14:12:29 -06:00
Michael Miller
425240e66f Merge branch 'release/0.9' into mocks-and-doubles 2019-09-27 14:07:02 -06:00
Michael Miller
d4e890af4c Merge remote-tracking branch 'origin/master' into example-restructure 2019-09-23 21:30:12 -06:00
Michael Miller
43dc106c18 Add return type annotations
Addresses Crystal compiler warning about abstract method return types.
2019-09-23 20:32:21 -06:00
Michael Miller
6e1605f246 Add TestContext 2019-09-17 20:57:59 -06:00
Michael Miller
08ee03b1de Quickly get things somewhat working again 2019-09-12 20:16:41 -06:00
Michael Miller
de8f298676 Remove hooks, conditions, and sample vlues (for now)
Removed only from examples and example groups.
2019-09-08 10:28:02 -06:00
Michael Miller
bfe641e07e Move sample values to group instance
The goal is to construct examples with a parameterless initializer.
This doesn't quite work, since the sample values are retrieved via the
harness, which doesn't have an active example when the sample values are
created.
2019-08-30 14:46:24 -06:00
Michael Miller
6e9633d001 Hacked in double instance creation 2019-08-26 22:48:15 -06:00
Michael Miller
8480349ff0 Force after_all hooks to run on fail-fast
Resolves issues #2.
2019-04-22 20:29:02 -06:00
Michael Miller
53bfcc25ef Add Ameba and address code linting issues 2019-04-06 17:19:02 -06:00
Michael Miller
f2c17189fc Adjust (mostly remove) explicit return types 2019-02-17 23:12:16 -07:00
Michael Miller
847cc662bd Update docs
Mostly fixes around symbols for syntax.
Added some missing docs and updated incorrect or vague ones.
2019-02-17 23:01:43 -07:00
Michael Miller
38202ff605 Initial addition of pre- and post-conditions 2019-01-09 16:17:33 -07:00
Michael Miller
aee3ead578 Revert "Pass current example to before_each and after_each hooks"
This reverts commit b5edb1e9f3.
2019-01-01 17:48:07 -07:00
Michael Miller
b5edb1e9f3 Pass current example to before_each and after_each hooks 2019-01-01 16:56:23 -07:00
Michael Miller
bd4d020d0f Condense visible hook methods 2018-12-05 19:57:14 -07:00
Michael Miller
f3feabb6e0 Reduce nesting of conditionals 2018-11-19 23:46:14 -07:00
Michael Miller
ee274dbebd Add docs for ExampleGroup 2018-11-19 21:52:10 -07:00
Michael Miller
e79d8872ac Cleanup indexer code 2018-11-19 19:41:51 -07:00
Michael Miller
6c882f9cae Remove ExampleGroup#all_examples
Implement the same functionality with ExampleIterator.
2018-11-13 10:08:37 -07:00