Commit graph

156 commits

Author SHA1 Message Date
Michael Miller
d35a739e60 Update LessThanMatcher to use MatchData 2019-03-05 16:53:15 -07:00
Michael Miller
f846408848 Update LessThanEqualMatcher to use MatchData 2019-03-05 16:37:51 -07:00
Michael Miller
36d3bd0a70 Update GreaterThanMatcher to use MatchData 2019-03-05 16:28:29 -07:00
Michael Miller
83d398465f Update GreaterThanEqualMatcher to use MatchData
Add PrefixedValue type to help convey values better (without string
concat).
2019-03-05 15:39:30 -07:00
Michael Miller
0288e1d6f8 Add tests for match data values 2019-03-05 14:00:14 -07:00
Michael Miller
7b0f607a6a Update EndWithMatcher to use MatchData 2019-03-04 20:16:21 -07:00
Michael Miller
1090a7f2f3 Fix botched copy/paste 2019-03-04 18:30:18 -07:00
Michael Miller
e7441df159 Update AttributesMatcher to use MatchData
This is a glorious mess.
2019-03-04 16:06:20 -07:00
Michael Miller
df663d30d9 Update EmptyMatcher to use MatchData 2019-03-03 20:21:39 -07:00
Michael Miller
be3218bcd8 Update ContainMatcher to use MatchData 2019-03-03 20:03:20 -07:00
Michael Miller
1db5341f4b Add tests for match data values 2019-03-03 19:31:39 -07:00
Michael Miller
e38bcd544a Update CaseMatcher to use MatchData 2019-03-03 19:05:20 -07:00
Michael Miller
50a782b803 Minor adjustments to equality matcher 2019-03-03 12:26:31 -07:00
Michael Miller
ec06daaf35 Test values returned by match data 2019-03-03 12:13:35 -07:00
Michael Miller
daf2f43f25 Rename module from Formatters to Formatting 2019-02-28 19:14:03 -07:00
Michael Miller
4e3290ebfe Initial code to get match data values to output
Expose the match data values through the Expectation class.
2019-02-28 16:35:50 -07:00
Michael Miller
6942e70024 Remove unnecessary type specification 2019-02-28 15:18:56 -07:00
Michael Miller
65dd6243dd Rename to match class name 2019-02-28 15:17:50 -07:00
Michael Miller
5ba03a90ff Swap label and expected value parameters
This matches the partial initializer parameters.
Also cleaned up some code in the Expectation spec.
2019-02-28 15:17:12 -07:00
Michael Miller
b4af87f903 Fix fallout from last commit in Expectation spec
All tests pass in this commit!
2019-02-28 13:52:01 -07:00
Michael Miller
e6ce54202d Remove Matcher methods moved to MatchData
Update spec for EqualityMatcher to reflect this.
2019-02-28 13:47:50 -07:00
Michael Miller
94cbb9860a Update NilMatcher to use MatchData and #match 2019-02-28 11:31:05 -07:00
Michael Miller
0dd66c8803 Update Expectation spec to use new parameters 2019-02-28 11:07:16 -07:00
Michael Miller
26187a0f31 Fix oddity with type being unresolvable 2019-02-27 22:20:57 -07:00
Michael Miller
c1f61d68bf Use MatchData 2019-02-26 20:29:04 -07:00
Michael Miller
e92b1dc466 Add #failed? method to Report 2019-02-22 15:09:55 -07:00
Michael Miller
919e2b96f6 Update specs for new Result#call functionality 2019-02-20 21:17:27 -07:00
Michael Miller
a015f30769 Add tests for Source#spec and update #to_s tests 2019-02-17 21:24:31 -07:00
Michael Miller
dc7d5fbe25 Lazy iterate over failures and errors
Return iterator from #failures and #errors methods in Report.
Update spec to reflect this.
2019-02-17 20:09:13 -07:00
Michael Miller
6cc3c5e20b Add tests for adding/omitting the space in #to_s 2019-02-17 17:03:57 -07:00
Michael Miller
fe083b0f74 Update specs to handle and test symbolic components 2019-02-17 16:39:23 -07:00
Michael Miller
6a8d447570 Add tests for Result#call implementations 2019-02-17 14:40:05 -07:00
Michael Miller
0b06e72f7e Simplify method chains by using #compact_map 2019-02-17 13:40:10 -07:00
Michael Miller
5722d18db9 Update or remove tests using result predicate methods 2019-02-17 13:35:24 -07:00
Michael Miller
ed01a95e67 Replace source file and line with source struct 2019-02-17 12:40:16 -07:00
Michael Miller
ffca0316a4 Add spec for source class 2019-02-17 12:32:15 -07:00
Michael Miller
7504536528 Remove conflicting duplicate #new_pending_result 2019-02-15 22:19:34 -07:00
Michael Miller
88c32b697b Add tests for source file and line 2019-02-14 19:35:42 -07:00
Michael Miller
1507a447c8 Update specs to use new source arguments
Used `new_partial` where the underlying partial didn't matter for the
test.
2019-02-14 17:04:59 -07:00
Michael Miller
36c98db0ae Update spec helpers to have source information 2019-02-14 15:41:59 -07:00
Michael Miller
f19b33d7a2 Add spec for Report and fix some bugs 2019-02-14 14:25:46 -07:00
Michael Miller
6151912fa6 Add spec for test suite 2019-02-12 22:33:48 -07:00
Michael Miller
493e30acee Remove elapsed time from pending results 2019-02-12 16:36:06 -07:00
Michael Miller
577877e067 Add spec for runner
Added a spy for detecting when formatter methods are called.
2019-02-12 16:10:14 -07:00
Michael Miller
50bc1af816 Method for creating groups of spy examples 2019-02-12 13:45:19 -07:00
Michael Miller
1f2f7f2214 Add spec for have_value matcher 2019-02-05 19:37:41 -07:00
Michael Miller
da9e653a89 Add spec for have_key matcher 2019-02-05 19:26:46 -07:00
Michael Miller
8a09ddac04 Add spec for predicate matcher 2019-02-05 10:36:59 -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