Commit Graph

661 Commits

Author SHA1 Message Date
Michael Miller 8cc66b538f Condense the ExpectedActual initializer
Made label and expected value public.
2019-02-28 14:41:30 -07:00
Michael Miller 4c7e8a3225 Condense expected and actual values and labels
Created a new struct specifically to store expected and actual valuesand
their user labels.
2019-02-28 14:05:31 -07:00
Michael Miller 520901332e Remove dummy MatchData type
Also fix for undefined MatchData type in Matcher types.
2019-02-28 13:53:54 -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 b4502711cd Add MatchData for EqualityMatcher
crystal spec runs, but fails for this commit.
2019-02-28 13:32:38 -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 b855599ce6 Workaround for strange compiler error 2019-02-28 10:53:03 -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 0bf106ab2e Placeholders for #match method 2019-02-23 22:33:33 -07:00
Michael Miller 42d8eb6da3 Matched flag isn't needed (match data has it) 2019-02-23 22:26:49 -07:00
Michael Miller 1e1503331e Initial change to MatchData 2019-02-23 21:52:10 -07:00
Michael Miller 87ca825845 Return 1 on failure 2019-02-22 16:54:36 -07:00
Michael Miller 487726ea54 Move failure command it's own type 2019-02-22 16:43:25 -07:00
Michael Miller e92b1dc466 Add #failed? method to Report 2019-02-22 15:09:55 -07:00
Michael Miller dbffad837d Calculate each type of result once at initialization 2019-02-22 13:54:12 -07:00
Michael Miller 5c2747efc0 Move stats to their own types 2019-02-22 13:47:57 -07:00
Michael Miller 48a1e61949 Change FailueBlock to a private struct 2019-02-20 21:47:18 -07:00
Michael Miller 0ca300ba89 Move characters constant to sub-module 2019-02-20 21:38:23 -07:00
Michael Miller e752f901a5 Move more failure block chunks to their own structs 2019-02-20 21:28:11 -07:00
Michael Miller bef3243c6c Remove unecessary result parameter 2019-02-20 21:22:42 -07:00
Michael Miller 919e2b96f6 Update specs for new Result#call functionality 2019-02-20 21:17:27 -07:00
Michael Miller 002c1d892b Adjust how Result#call works 2019-02-20 21:00:22 -07:00
Michael Miller 8f85a6436f Rewrite to use indentation methods 2019-02-20 20:09:23 -07:00
Michael Miller 1cd0f0249e Create struct for colorized comment 2019-02-19 19:56:07 -07:00
Michael Miller 4126ee3451 Some work on FailureBlock 2019-02-17 23:15:58 -07:00
Michael Miller f2c17189fc Adjust (mostly remove) explicit return types 2019-02-17 23:12:16 -07:00
Michael Miller b646b8bec5 Remove unused ExampleStatus enum 2019-02-17 23:09:23 -07:00
Michael Miller eaf1d19feb Move the expectations attribute up to FinishedResult 2019-02-17 23:03:43 -07:00
Michael Miller 847cc662bd Update docs
Mostly fixes around symbols for syntax.
Added some missing docs and updated incorrect or vague ones.
2019-02-17 23:01:43 -07:00
Michael Miller 9c16a5a53e Move characters to a named tuple 2019-02-17 21:35:17 -07:00
Michael Miller bd500b0799 Move color constants to a private named tuple 2019-02-17 21:32:42 -07:00
Michael Miller 1a998b6cb6 Add comment color 2019-02-17 21:30:41 -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 2c7cd9b728 Add #path method
Update #to_s to use relative path if possible.
2019-02-17 21:23:57 -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 32a049d973 Colorize must be explicitly dragged in 2019-02-17 20:05:32 -07:00
Michael Miller 6601f5f9ee Remove DefaultFormatter
The default formatter is now DotsFormatter.
2019-02-17 17:39:04 -07:00
Michael Miller ace31973bc Whitespace 2019-02-17 17:05:59 -07:00
Michael Miller 1885ab0aa0 Fix leading space when group isn't symbolic 2019-02-17 17:05:10 -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 f6a4e6f558 Remove space in #to_s between symbolic items
This makes example names look more like documentation by changing names 
like "Array #size is zero" to "Array#size is zero".
2019-02-17 16:29:38 -07:00
Michael Miller 8339784492 Add symbolic attribute to example components
This is used to determine whether a type or method is referenced.
2019-02-17 16:27:41 -07:00
Michael Miller 968775a5c3 Some cleanup and docs for SuiteSummary 2019-02-17 15:13:24 -07:00
Michael Miller d63a480516 Initial cleanup and docs for FailureBlock 2019-02-17 15:02:07 -07:00
Michael Miller 0f5395d592 Remove call to source in failure block 2019-02-17 14:54:33 -07:00
Michael Miller 11c738b941 Use Result#call instead of case-statement
Color module is no longer mixed-in.
2019-02-17 14:48:54 -07:00