Commit graph

49 commits

Author SHA1 Message Date
Michael Miller
59ce312341
Fix typos and spelling 2021-11-28 15:45:17 -07: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
0f7a9ed9e8
Remove append and prepend variants of hook definition methods
RSpec defines these as applying to a scope (example, context, suite) as 
opposed to example group.
Mimicing this is currently not possible in Spectator and would require a 
substantial restructure of how hooks are handled.
This may be implemented in the future.
2021-08-08 11:50:30 -06:00
Michael Miller
91d21b38e2
Lazily initialize global DSL spec builder
Require config to create a spec builder.
Config should be fully set up before any DSL is encountered.
2021-08-08 11:25:06 -06:00
Michael Miller
605b82c532
Add prepend and append variants of hooks to DSL 2021-08-08 10:51:39 -06:00
Michael Miller
a810eef16c
Add before_suite and after_suite 2021-07-17 14:19:16 -06:00
Michael Miller
3e4079d408
Remove Spec namespace 2021-07-05 11:49:16 -06:00
Michael Miller
4ff27defff
Initial code for iterative (sample) groups 2021-06-13 13:16:31 -06:00
Michael Miller
a08d5202fe
Implement pending examples as lighweight examples
Drop test code block if a pending, skip, or x-prefix macro is used.
2021-06-05 12:51:46 -06:00
Michael Miller
74b78b7ca8
Rename Source to Location 2021-02-12 22:46:22 -07:00
Michael Miller
b7ed4ec14c
Nest spec types 2021-01-21 00:03:39 -07:00
Michael Miller
153933b044
Add DSL and code to create around_each hooks 2021-01-16 16:47:40 -07:00
Michael Miller
df096d91aa
Capture source info for hooks 2021-01-09 11:30:00 -07:00
Michael Miller
7d54884196
Don't pass context, get/cast from example instance 2020-11-08 16:53:54 -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
79499c5d2e
Add config to spec builder 2020-10-17 17:40:38 -06:00
Michael Miller
579fcacfde
Move spec builder 2020-09-26 22:51:58 -06:00
Michael Miller
543df88d39
Forward build method 2020-09-26 22:25:04 -06:00
Michael Miller
acb3b16496
Add some docs 2020-09-26 18:14:22 -06:00
Michael Miller
bc602d9b62
Working example creation from DSL 2020-09-14 13:55:07 -06:00
Michael Miller
67ac06e4d6
Some initial spec builder code 2020-09-12 18:37:14 -06:00
Michael Miller
fafe5606e6 Rename DSL::Builder to SpecBuilder
Place all builders under SpecBuilder.
2019-09-13 14:10:25 -06:00
Michael Miller
5d86b4f50e Get examples working again 2019-09-12 20:26:54 -06:00
Michael Miller
08ee03b1de Quickly get things somewhat working again 2019-09-12 20:16:41 -06:00
Michael Miller
e304224bd6 Move stack handling to its own type 2019-09-08 09:59:25 -06:00
Michael Miller
2ff9505766 Add filter to TestSuite 2019-03-25 11:35:39 -06: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
c1b27bb672 Rename "given" to "sample"
This falls in line with the `SampleValues` type.
It also frees up the keyword "given" to be used for something else.
2018-12-27 11:15:44 -07:00
Michael Miller
38ec35dd29 Have the DSL builder produce a test suite 2018-12-12 15:27:40 -07:00
Michael Miller
eb8ce6ff92 Add docs to DSL and builder 2018-10-28 18:27:54 -06:00
Michael Miller
ab146c88c2 Bit of code cleanup 2018-10-14 17:43:33 -06:00
Michael Miller
bff6d463df Root group builder should not inherit from nested 2018-10-14 17:40:37 -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
2070d7816b Root example group specialization 2018-10-14 14:28:05 -06:00
Michael Miller
77b4c71c2a Reduce nesting by collapsing modules with :: 2018-09-27 16:20:55 -06:00
Michael Miller
cf0c438a5d Abstract away locals to SampleValues 2018-09-23 17:04:06 -06:00
Michael Miller
cddfe5591d Move ValueWrapper and TypedValueWrapper to Internals
Trying to hide from top-level some inner-workings.
2018-09-23 16:23:26 -06:00
Michael Miller
3c31783fd7 Pass arguments directly onto initializer with splat 2018-09-23 14:45:14 -06:00
Michael Miller
94e2f54713 Implement building groups and examples 2018-09-23 14:34:42 -06:00
Michael Miller
037fe604ea Example group builder classes should build groups
It's implied in their name.
2018-09-23 13:40:16 -06:00
Michael Miller
faf3bef05c Fix typo 2018-09-23 12:21:10 -06:00
Michael Miller
fc1c0351cd Must use class variables 2018-09-23 12:19:29 -06:00
Michael Miller
09184f4a2a Group builder needs "what" as first arg 2018-09-23 12:15:53 -06:00
Michael Miller
0999cb2dbc Use fully-qualified names 2018-09-23 12:05:19 -06:00
Michael Miller
9ba3fc898b More refatoring 2018-09-22 19:41:56 -06:00
Michael Miller
a1b5533504 Some initial work to cleanup the DSL builder 2018-09-22 15:15:29 -06:00