Commit Graph

79 Commits

Author SHA1 Message Date
Michael Miller 726a2e1515
Add non-captured block argument
Preparing for Crystal 1.8.0
https://github.com/crystal-lang/crystal/issues/8764
2023-01-26 17:19:31 -07:00
Michael Miller 275b217c6c
Allow metadata to be stored as nil 2022-11-29 23:22:42 -07:00
Michael Miller 60b5f151f1
Minor improvements to log output 2022-11-04 22:05:27 -06:00
Michael Miller 8b12262c62
Display <root> when to_s is called directly on the root group 2022-11-04 21:01:32 -06:00
Michael Miller 6e7d215f69
Add type annotations to to_s and inspect 2022-11-04 20:56:02 -06:00
Michael Miller a51640105c
Re-add pre- and post-condition hooks
Accidentally removed in hook refactoring.
Addresses https://gitlab.com/arctic-fox/spectator/-/issues/62
2021-09-16 09:01:51 -06:00
Michael Miller c209fe7259
Add ascend methods 2021-08-17 22:10:01 -06:00
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