Michael Miller
914def05e1
Add docs
2022-03-31 18:51:28 -06:00
Michael Miller
18a03b02fe
Include reserved
2022-03-19 22:36:25 -06:00
Michael Miller
04cf211f24
Move reserved keywords to a separate file
...
Add finalize as a reserved keyword.
2022-03-19 21:56:18 -06:00
Michael Miller
bed84b315d
Add lazy double
2022-03-19 19:32:41 -06:00
Michael Miller
99aa8afdce
Add as_null_object method
2022-03-19 14:41:45 -06:00
Michael Miller
5a4e95e8a2
Split double macro into def_double and new_double
2022-03-19 11:41:53 -06:00
Michael Miller
4dff018330
Pass along block only if it exists
2022-03-19 11:28:36 -06:00
Michael Miller
20087f1c57
Treat any tokens starting with _spectator as reserved
2022-03-12 19:17:38 -07:00
Michael Miller
59f966d0e0
Fix missing double name
...
Rename internal method to _spectator_stubbed_name.
This is a better name for mocks and doubles.
Improve some handling around stubbed name.
2022-03-12 12:17:27 -07:00
Michael Miller
76c1d6a096
Some rework of stubs and doubles
2022-03-12 09:39:32 -07:00
Michael Miller
8668e495ef
Placeholder mocks DSL
2022-03-05 10:41:52 -07:00
Michael Miller
0ea7890ece
Merge branch 'master' into mock-redesign
2022-02-28 20:39:33 -07:00
Michael Miller
92e839415d
Fix sample iteration with single block arg (not tuple)
2022-01-26 13:14:30 -07:00
Michael Miller
d6112bd2dd
Rip out mocks
2022-01-26 12:41:41 -07:00
Michael Miller
4057089c20
Support multiple block arguments in sample block
...
https://github.com/icy-arctic-fox/spectator/issues/41#issuecomment-1010192486
2022-01-11 15:53:53 -07:00
Michael Miller
dd49fe3a67
Support string interpolation for example names
2022-01-10 21:29:05 -07:00
Michael Miller
aabec269cb
Raise compilation error for string interpolation in group name
2022-01-10 21:11:28 -07:00
Michael Miller
4d81031274
Fix usage of 'expect' outside test block
...
Previously gave weird runtime erorr about mismatched groups.
Now correctly produces a compilation error.
2021-12-13 02:42:02 -07:00
Michael Miller
d9269e17a8
Better implementation of explicit subject
2021-12-02 01:57:34 -07:00
Michael Miller
315a318d7d
Explicit "provided" block description
...
Implements https://gitlab.com/arctic-fox/spectator/-/issues/69
2021-12-01 19:11:36 -07:00
Michael Miller
59ce312341
Fix typos and spelling
2021-11-28 15:45:17 -07:00
Michael Miller
627a288358
Missing doc
2021-09-20 11:01:00 -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
c49522a791
Allow tags on top-level groups
2021-08-18 15:57:22 -06:00
Michael Miller
21d14bd814
Add f-prefix variants of groups and examples
...
For instance: `fit` for `it "...", :focus`
2021-08-18 13:55:21 -06:00
Michael Miller
65799fdd3b
Pass along end line
2021-08-17 13:49:58 -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
abe78410c4
Formatting
2021-07-31 14:18:59 -06:00
Michael Miller
868aa1d00a
Support custom handling of hooks
2021-07-31 14:16:39 -06:00
Michael Miller
f53ffabf6b
Support label for aggregate_failures block
2021-07-31 12:04:43 -06:00
Michael Miller
4c125d98d4
Implement aggregate_failures
2021-07-31 11:56:53 -06:00
Michael Miller
9a97596b84
Allow named arguments in provided
block
2021-07-31 10:15:16 -06:00
Michael Miller
6c6dff363b
Track source location of pending result
2021-07-17 16:25:32 -06:00
Michael Miller
a810eef16c
Add before_suite
and after_suite
2021-07-17 14:19:16 -06:00
Michael Miller
571bc7d8a5
Reuse iterative example group macro code
...
Add support for x prefix to skip sample and random_sample groups.
2021-07-17 13:25:38 -06:00
Michael Miller
e506c6b981
Implement random_sample
2021-07-17 13:05:03 -06:00
Michael Miller
9d72d26630
Handle sample count
2021-07-17 12:49:11 -06:00
Michael Miller
76a23131cb
More checks for missing block in DSL
...
Improved some error messages.
2021-07-17 12:36:21 -06:00
Michael Miller
640857bef2
Pretty up iterative group names
2021-07-17 12:15:41 -06:00
Michael Miller
d8e9d3128a
Fetch iteration item from group
2021-07-17 12:07:04 -06:00
Michael Miller
aa12cdf17c
Introduce non-expectation error ExampleFailed
...
Used by fail method.
Still todo: Output from failed example is missing because there are no
expectations.
2021-07-10 03:32:55 -06:00
Michael Miller
3e4079d408
Remove Spec namespace
2021-07-05 11:49:16 -06:00
Michael Miller
6a01ab3531
Merge master into release/0.10
2021-07-05 11:32:45 -06:00
Michael Miller
989f53c6d6
Initial code for sample groups
2021-06-19 11:57:56 -06:00
Michael Miller
44ade24fb7
Generate context one or more times
...
This is necessary for iterative (sample) groups so they don't share a
context.
2021-06-19 11:33:26 -06:00
Michael Miller
4b8d28c916
Wording on compiler error for block args
2021-06-19 10:54:31 -06:00
Michael Miller
4ff27defff
Initial code for iterative (sample) groups
2021-06-13 13:16:31 -06:00
Michael Miller
e51ad6d504
Check if provided
and given
are used in a method
2021-06-12 17:06:43 -06:00