Commit graph

623 commits

Author SHA1 Message Date
Michael Miller
e14e86a5f3 Add have_value matcher 2019-02-05 19:37:25 -07:00
Michael Miller
7698724241 Update old naming to new matcher name 2019-02-05 19:30:44 -07:00
Michael Miller
da9e653a89 Add spec for have_key matcher 2019-02-05 19:26:46 -07:00
Michael Miller
c6b4e22666 Add have_key matcher 2019-02-05 12:47:50 -07:00
Michael Miller
8a09ddac04 Add spec for predicate matcher 2019-02-05 10:36:59 -07:00
Michael Miller
6bfd15b7f9 Parameterless initializer that generates the label 2019-02-05 10:36:37 -07:00
Michael Miller
0e0b8f4ae2 Base PredicateMatcher off of Matcher
No need to store an expected value.
Matcher's initializer must be public.
2019-02-05 10:14:33 -07:00
Michael Miller
89208b8ed1 Implement predicate matcher
Took a trick I learned from `have_attributes` and applied it here.
2019-02-04 22:52:09 -07:00
Michael Miller
5da222d7a0 Whitespace 2019-02-04 16:27:40 -07:00
Michael Miller
71427e4f6b Use spy to test that matchers use === operator 2019-02-04 16:26:53 -07:00
Michael Miller
e42e5b30bb Fix test 2019-02-04 16:20:35 -07:00
Michael Miller
75c4bcad54 Add spec for have_attributes matcher 2019-02-04 16:19:39 -07:00
Michael Miller
1c9cb41fa2 Add have_attributes matcher
This one is kind of magical.
2019-02-01 22:24:06 -07:00
Michael Miller
c504c945a7 Remove redundant matchers 2019-02-01 21:37:48 -07:00
Michael Miller
ade4af0153 Add tests for multiple arguments 2019-02-01 20:44:25 -07:00
Michael Miller
239779135f Fix have matcher tests for multiple arguments 2019-02-01 20:29:13 -07:00
Michael Miller
0c4ffdf587 Allow have matcher to take multiple values 2019-02-01 20:27:51 -07:00
Michael Miller
6d90966f93 Update doc 2019-02-01 20:17:46 -07:00
Michael Miller
4043a76a07 Add tests for multiple arguments 2019-02-01 19:56:46 -07:00
Michael Miller
acea12cafb Fix contain matcher tests for multiple arguments 2019-02-01 19:45:30 -07:00
Michael Miller
85b4e6894b Allow contain matcher to take multiple values 2019-02-01 19:43:42 -07:00
Michael Miller
7c8239e55b The respond_to matcher doesn't seem possible
Might be possible if a matcher was dynamically generated by a macro, 
but... ¯\_(ツ)_/¯
2019-02-01 19:21:31 -07:00
Michael Miller
5389a39231 Add DSL for be_close matcher 2019-02-01 19:10:28 -07:00
Michael Miller
196b4d97a5 Add spec for have matcher 2019-02-01 16:43:18 -07:00
Michael Miller
4ea439622d Implement have matcher
This is very similar to the `contain` matcher.
I would have used `include` for the matcher name, but it is a keyword
that can't be used in this syntax.
2019-02-01 16:25:45 -07:00
Michael Miller
50c2d4fbed Revise list of matchers 2019-02-01 15:40:43 -07:00
Michael Miller
2a91191a6b Add spec for contain matcher 2019-01-31 23:12:48 -07:00
Michael Miller
f4ac7a3405 Add contain matcher 2019-01-31 23:06:00 -07:00
Michael Miller
5f9c0385ad Check for mentions of first and last 2019-01-31 22:13:50 -07:00
Michael Miller
a91758b3f3 Add spec for end_with matcher 2019-01-31 22:11:38 -07:00
Michael Miller
d0711f940d Add end_with matcher 2019-01-31 22:05:27 -07:00
Michael Miller
e6e4f28a4c Add spec for start_with matcher 2019-01-31 19:36:35 -07:00
Michael Miller
0a310cb243 Add start_with matcher 2019-01-31 16:43:43 -07:00
Michael Miller
5c219195e1 Formatting 2019-01-31 13:55:36 -07:00
Michael Miller
e2779822b5 Remove unecessary type restrictions 2019-01-31 13:52:41 -07:00
Michael Miller
a53bafe333 Remove (now pointless) ConditionMatcher 2019-01-31 13:42:24 -07:00
Michael Miller
5ac9020f25 Move abstract #match?, #message, and #negated_message to base class 2019-01-31 13:40:32 -07:00
Michael Miller
a633d41fae Move #eval to base class
Code is identical across sub-classes.
2019-01-31 13:34:09 -07:00
Michael Miller
3731b6d785 Remove BlockExpectation 2019-01-31 13:32:34 -07:00
Michael Miller
ff4e148509 Rename ValueExpectation to Expectation in tests 2019-01-31 13:30:09 -07:00
Michael Miller
1ce594051c Remove sub-class and abstract base for Expectation
This was over-engineered and only the base class is needed.
2019-01-31 13:29:26 -07:00
Michael Miller
46a6a4e51e Remove reference to short-hand for non-block macro 2019-01-28 16:58:36 -07:00
Michael Miller
2863ae7dfe Add spec for block expectation and partial 2019-01-28 16:03:33 -07:00
Michael Miller
61200765c0 Add block expectation and partial 2019-01-28 15:56:04 -07:00
Michael Miller
69ffaa3796 Update doc 2019-01-28 15:47:01 -07:00
Michael Miller
61a3e6b113 Remove unecessary type restrictions 2019-01-28 10:04:17 -07:00
Michael Miller
592d13d0d4 Move #to and #to_not to base type
Remove some explicit type restrictions.
2019-01-28 01:09:22 -07:00
Michael Miller
14db544441 Split question matchers into other types 2019-01-26 17:12:21 -07:00
Michael Miller
651127f2d4 Add spec for empty matcher
Mark question matchers as done (for now).
More may be added later if they're common.
2019-01-26 17:09:24 -07:00
Michael Miller
5231f0fd39 Copy/paste fail 2019-01-26 17:07:21 -07:00