Michael Miller
a3fa522bd4
Refactor TruthyMatcher
2019-08-08 15:59:31 -06:00
Michael Miller
badccad2fa
Some more easy target refactors
...
EmptyMatcher should extend StandardMatcher.
2019-08-08 15:45:34 -06:00
Michael Miller
17aa472d92
Refactor HaveMatcher
2019-08-08 15:26:30 -06:00
Michael Miller
f1ebce7739
Refactor HaveKeyMatcher and HaveValueMatcher
2019-08-08 15:25:32 -06:00
Michael Miller
7cca43029e
Refactor ExceptionMatcher
2019-08-08 14:20:21 -06:00
Michael Miller
72e5735106
Refactor EndWithMatcher
2019-08-07 00:08:32 -06:00
Michael Miller
f2f46418a3
Refactor collection matcher
2019-08-07 00:07:39 -06:00
Michael Miller
ec96bf2de2
Refactor AttributesMatcher to use new style
2019-08-06 23:35:36 -06:00
Michael Miller
6a317b7a21
Re-add ordering methods
2019-08-06 23:22:50 -06:00
Michael Miller
3314ce8579
Remove ExpectedActual utility class
...
Don't think this is needed anymore.
2019-08-06 23:21:08 -06:00
Michael Miller
98b2cbc9cb
Fix type inference
2019-08-06 23:20:23 -06:00
Michael Miller
436c10cad6
Simplify match data values by using named tuples
2019-08-06 23:13:33 -06:00
Michael Miller
e7b19ee591
Insert StandardMatcher into Matcher hierarchy
...
This is to remove all the unused abstract methods.
2019-08-06 22:33:13 -06:00
Michael Miller
ab147d00fb
Cleanup match methods
2019-08-06 22:18:05 -06:00
Michael Miller
13fad5081b
Initial refactor of ArrayMatcher
2019-08-06 21:56:33 -06:00
Michael Miller
044202e606
Use inspect instead of to_s for value reporting
2019-08-06 21:55:22 -06:00
Michael Miller
5cc735368c
Update comparison matchers
2019-08-01 21:17:24 -06:00
Michael Miller
42b8fe471f
Fix some includes and a dangling old file
2019-08-01 16:37:19 -06:00
Michael Miller
11600a2f8d
Simplify more matchers that are easy targets
2019-08-01 16:35:02 -06:00
Michael Miller
16a2204a2d
Simplify CaseMatcher by using new matcher refactoring
2019-08-01 16:17:39 -06:00
Michael Miller
c75fba8076
Change visibility to private
2019-08-01 16:17:12 -06:00
Michael Miller
4b59dcf142
Pass actual value to failure message methods and values
2019-08-01 16:02:28 -06:00
Michael Miller
f63697b019
Update ValueMatcher to use Matcher's methods
2019-08-01 15:59:29 -06:00
Michael Miller
114a4077f3
Fix parameters on LabeledValue
2019-08-01 15:58:48 -06:00
Michael Miller
f004912fc1
Value first, then label
2019-08-01 15:48:39 -06:00
Michael Miller
7e3b3cd999
Fix namespaces
2019-08-01 15:44:04 -06:00
Michael Miller
99d8f2a845
Use TestValue instead of custom LabeledValue
2019-08-01 15:40:46 -06:00
Michael Miller
763a65beac
Rename again
...
This naming is more appropriate since these types can be used for
expected and actual values.
2019-08-01 15:38:20 -06:00
Michael Miller
dd69cec536
Should capture a block instead of a value
2019-08-01 15:22:45 -06:00
Michael Miller
28680fa849
Rename Actual types to be more "human" sounding
2019-08-01 15:22:18 -06:00
Michael Miller
79a095bb31
Use new style expectations and actuals in DSL
2019-08-01 15:00:56 -06:00
Michael Miller
96c271cf33
No need to shout
2019-08-01 14:46:47 -06:00
Michael Miller
ba1c37b142
Fix macro
2019-08-01 14:46:13 -06:00
Michael Miller
45e9fa186f
Merge branch 'release/0.8' into matcher-refactor
2019-08-01 14:42:14 -06:00
Michael Miller
0428246cda
Update Crystal version to 0.30.0
2019-08-01 14:27:12 -06:00
Michael Miller
10cf7bbb77
Update Expectation to use new MatchData
2019-08-01 14:05:27 -06:00
Michael Miller
96f2888b88
Fully implement match methods
...
Add placeholders for matcher values.
2019-08-01 14:05:05 -06:00
Michael Miller
acd01a23e6
Re-add MatchData and variants
2019-08-01 14:04:00 -06:00
Michael Miller
ae43c930bf
Replace MatchDataValue types with a single LabeledValue
2019-08-01 13:49:08 -06:00
Michael Miller
43ba4de202
Merge branch 'matcher-refactor-split' into matcher-refactor
2019-07-31 21:04:28 -06:00
Michael Miller
3a7dc7299a
Rewrite ExpectationPartial and remove sub-types
...
The partial now contains the actual and source.
It also calls the correct match method on the matcher and constructs an
expectation (which needs to be updated).
2019-07-31 20:11:30 -06:00
Michael Miller
42b916bdf7
New "actual" types
2019-07-31 20:01:39 -06:00
Michael Miller
e95c81f46e
Pass negation flag to matcher
...
Some matchers need to know if they're negated to work properly and can't
be simply negated afterwards.
2019-07-30 16:19:27 -06:00
Michael Miller
ab1c0269e0
Remove DummyMatchData
...
No longer needed since MatchData was changed to non-abstract.
2019-07-30 16:13:48 -06:00
Michael Miller
a06247bb1e
Change MatchData to Expectation
...
After including negation into matcher logic, these types are equivalent.
2019-07-30 16:11:55 -06:00
Michael Miller
27f844ce25
Remove abstract base match data
...
Switching to a single type that holds the data.Trying to reduce the
number of types and generic types generated.
2019-07-30 16:08:06 -06:00
Michael Miller
ae18316a5a
Update README with implemented matchers
2019-07-19 17:14:13 -06:00
Mike Miller
95f730965c
Merge branch 'let-assignment-variant' into 'release/0.8'
...
Change wording around let variant
See merge request arctic-fox/spectator!12
2019-07-19 23:11:42 +00:00
Michael Miller
c7e6b82a9a
Change wording around let variant
...
The value is set when the expression is run at program startup, not when
the test starts.
2019-07-19 23:10:22 +00:00
Mike Miller
31fb1c3e81
Merge branch 'let-assignment-variant' into 'release/0.8'
...
Implement assignment variant of let keyword
See merge request arctic-fox/spectator!11
2019-07-19 22:49:09 +00:00