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
Michael Miller
6a8d447570
Add tests for Result#call implementations
2019-02-17 14:40:05 -07:00
Michael Miller
75f9a5838b
Add #call
method to each result
...
This feels like a good middle-ground.
I didn't want this to be a factory method, or return an instance.
That seemed like overkill for formatting.
But I don't want to place if and case-statements everywhere in the
formatters.
I hope this doesn't violate single-responsibility principle or any other
guidelines.
2019-02-17 14:24:02 -07:00
Michael Miller
0b06e72f7e
Simplify method chains by using #compact_map
2019-02-17 13:40:10 -07:00
Michael Miller
3a508cae26
Update Report class to not use result predicates
2019-02-17 13:36:10 -07:00
Michael Miller
5722d18db9
Update or remove tests using result predicate methods
2019-02-17 13:35:24 -07:00
Michael Miller
8dd8db74b9
Remove predicate methods from Result types
2019-02-17 13:15:40 -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
dc66b184e2
Add source class
2019-02-17 12:25:23 -07:00
Michael Miller
04bccd162e
Use @io instead of STDOUT
2019-02-15 23:10:08 -07:00
Michael Miller
49175e56ac
Initial code for summary output
2019-02-15 23:05:48 -07:00
Michael Miller
7504536528
Remove conflicting duplicate #new_pending_result
2019-02-15 22:19:34 -07:00
Michael Miller
e8ca350152
Allow output to be printed to other streams
2019-02-15 22:12:18 -07:00
Michael Miller
2012db85c5
Initial code for refactoring formatters
2019-02-15 22:09:53 -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
ac5c2bbe47
Reorder source arguments and simplify
2019-02-14 16:19:49 -07:00
Michael Miller
61e92951ae
Add source file and line number to expectations
2019-02-14 16:04:09 -07:00
Michael Miller
36c98db0ae
Update spec helpers to have source information
2019-02-14 15:41:59 -07:00
Michael Miller
5913a4c18f
Add source file and line number
...
The issue with nested macros losing their source location has been
fixed!
2019-02-14 15:41:26 -07:00
Michael Miller
f19b33d7a2
Add spec for Report and fix some bugs
2019-02-14 14:25:46 -07:00
Michael Miller
600c9fbde1
Reorder methods
2019-02-12 23:43:43 -07:00
Michael Miller
d0a8a1deae
Cast failure and error results
2019-02-12 23:34:56 -07:00
Michael Miller
8c5760e8dd
Rename methods for clarity
2019-02-12 23:18:04 -07:00