Michael Miller
0f8c46d6ef
Support casting types with expect statements
2022-12-19 21:29:21 -07:00
Michael Miller
e9d3f31ac3
Use harness' cleanup instead of defer
2022-10-09 15:32:32 -06:00
Michael Miller
5c910e5a85
Clear stubs defined with expect().to receive()
syntax after test finishes
2022-10-09 13:57:28 -06:00
Michael Miller
6e57a1c44a
Allow method calls with unconstrained arguments
...
Workaround for the expect-receive DSL syntax to allow methods to be called without matching arguments.
2022-07-12 19:23:13 -06:00
Michael Miller
c91e288f61
Add initial support for exect-receive syntax
2022-07-12 19:11:44 -06:00
Michael Miller
8ac6546bdd
Rip out more existing mocks
2022-02-28 22:15:29 -07:00
Michael Miller
59ce312341
Fix typos and spelling
2021-11-28 15:45:17 -07:00
Michael Miller
53f7c94e8a
Add missing negation variants for method stubs
2021-10-11 22:39:16 -06:00
Michael Miller
abe78410c4
Formatting
2021-07-31 14:18:59 -06:00
Michael Miller
e8413db33f
Support custom messages for failed expectations
...
Fixes https://gitlab.com/arctic-fox/spectator/-/issues/28
2021-07-17 17:42:25 -06:00
Michael Miller
ccedcdac42
Use getter! macro
2021-07-10 03:31:22 -06:00
Michael Miller
835fa40773
Handle nil location
2021-06-02 23:35:41 -06:00
Michael Miller
39e917ce57
Consistent location fields
2021-06-02 23:09:30 -06:00
Michael Miller
8f3a7c0a5a
Basically done JSON formatter
2021-06-02 22:48:48 -06:00
Michael Miller
74b78b7ca8
Rename Source to Location
2021-02-12 22:46:22 -07:00
Michael Miller
bda554739c
Re-add JSON output for some types
2021-01-30 20:07:36 -07:00
Michael Miller
76378c9dae
Whitespace
2021-01-21 21:05:12 -07:00
Michael Miller
a8840351d5
More work hooking up expectations
2021-01-21 00:03:57 -07:00
Michael Miller
3527507639
Remove debug
2021-01-16 11:13:20 -07:00
Michael Miller
4500ebcddc
Update old references to Value and Block
2021-01-16 11:02:29 -07:00
Michael Miller
e09f5c960a
Change Assertions to Expectations
...
Start expectation rework.
2021-01-16 10:22:23 -07:00
Michael Miller
3035273e9a
Rework how expectations and matchers work together
2018-09-28 11:47:42 -06:00
Michael Miller
b9abdb86ff
Use actual value if label is empty
...
This will show a value instead of nothing if the should-syntax is used.
2018-09-27 16:28:47 -06:00
Michael Miller
f63f8b15a0
Use label (expression string) instead of value
2018-09-24 22:58:35 -06:00
Michael Miller
371fe680c2
Pass matcher messages to failure results
2018-09-24 22:57:37 -06:00
Michael Miller
562b544223
Capture expression string from expectations
...
This allows a string that the user had in source code instead of a resolved value.
This change requires storing a 'label' and changing expectation and matcher constructor methods to macros.
2018-09-24 22:51:26 -06:00
Michael Miller
1ea06998e7
Move #expect from global namespace to example DSL
2018-09-15 11:30:45 -06:00
Michael Miller
b5cdda4af3
Shorten ExpectationFailedError to ExpectationFailed
2018-09-15 11:05:11 -06:00
Michael Miller
a65aedbfb7
Implement #to_not
2018-08-30 14:15:07 -06:00
Michael Miller
74905b82bd
Minimal handling of expectations and failures
2018-08-23 12:44:40 -06:00
Michael Miller
b709820e11
Add expectation class
2018-08-21 21:07:37 -06:00