Michael Miller
785f2ef2dd
Missing doc
2019-03-30 18:38:06 -06:00
Michael Miller
27ec27a3f3
Add array matcher
2019-03-30 18:38:06 -06:00
Michael Miller
cd60fae157
Add respond_to matcher
2019-03-28 23:20:32 -06:00
Michael Miller
e87314be58
Use block instead of yield to insert block
...
The "yield" method produces `begin...end`.
The "block" method produces `do...end`, which is needed for this syntax.
2019-03-26 21:45:31 -06:00
Michael Miller
2da1f9dbbf
Missed one
2019-03-26 18:05:08 -06:00
Michael Miller
007c0c7950
Fix "missing" variables caused by wrong macro syntax
2019-03-26 17:59:15 -06:00
Michael Miller
44e681ae79
Change JSON timing values to seconds as a float
2019-03-25 16:56:38 -06:00
Michael Miller
4eb8eadd9e
Add profile info to JSON output
2019-03-25 16:54:27 -06:00
Michael Miller
df6431f2d7
Add profile summary to TAP output
2019-03-25 16:49:57 -06:00
Michael Miller
291a927f1e
Add profile information to suite summary
2019-03-25 16:44:20 -06:00
Michael Miller
34b0399654
Use example_runtime instead of total runtime
...
This fixes the issue where < 10 examples in profile showed less than
100% total time.
2019-03-25 16:31:01 -06:00
Michael Miller
72aa72781a
Move human time to its own type to share it
2019-03-25 16:15:00 -06:00
Michael Miller
aabc25ad4f
Change formatters to take nillable profile
2019-03-25 16:05:38 -06:00
Michael Miller
6dd4c4bc2f
Add Profile class
2019-03-25 15:54:51 -06:00
Michael Miller
a02e2ff701
Add profile config option
2019-03-25 12:26:45 -06:00
Michael Miller
35b887f8f0
Add placeholders for profile functionality
2019-03-25 12:13:11 -06:00
Michael Miller
2d88097c04
Re-implement filters in command-line arguments
2019-03-25 11:39:27 -06:00
Michael Miller
2ff9505766
Add filter to TestSuite
2019-03-25 11:35:39 -06:00
Michael Miller
49c396714e
Revert 29279e1
...
Update Runner to not use Iterable#each
2019-03-25 11:29:20 -06:00
Michael Miller
3654b2473b
Add example filter to config
2019-03-25 11:17:53 -06:00
Michael Miller
d1767ebb7a
Add CompositeExampleFilter
2019-03-25 11:10:27 -06:00
Michael Miller
481319c097
Add NullExampleFilter
2019-03-25 10:58:49 -06:00
Michael Miller
a3c1892465
Move example filters from === to their own types
2019-03-25 10:51:50 -06:00
Michael Miller
b2ab579d8a
Remove --pattern option
...
This can be handled by calling `crystal spec`.
2019-03-25 10:51:20 -06:00
Michael Miller
3787d4fc28
Cleanup cli arguments by breaking apart parser.on calls
2019-03-25 09:41:36 -06:00
Michael Miller
bf2c62b7e8
Initial work on filter criteria
2019-03-23 22:38:44 -06:00
Michael Miller
8c66f8df34
Add ExampleFilter class
2019-03-23 22:03:49 -06:00
Michael Miller
2f8b4761de
Make Example comparable against names and sources
...
This will be needed for filtering examples.
2019-03-23 21:40:13 -06:00
Michael Miller
4f3ca20741
Parse source strings
2019-03-23 20:47:41 -06:00
Michael Miller
268db53bf8
Use more sensible label for non-labeled procs
2019-03-23 20:23:31 -06:00
Michael Miller
ac85fac968
Unprotect build method
2019-03-23 20:22:09 -06:00
Michael Miller
d04db7bf68
Add specialized should/should_not methods for procs
2019-03-23 20:20:15 -06:00
Michael Miller
102105911c
Fix "should" syntax
2019-03-23 20:15:35 -06:00
Michael Miller
ebfec8058e
Hide getters from external types
2019-03-23 20:01:42 -06:00
Michael Miller
bc8b608789
Perform in-place shuffle
2019-03-23 19:58:45 -06:00
Michael Miller
7b1b65f553
Implement --order flag to match RSpec
2019-03-23 19:56:00 -06:00
Michael Miller
b6453d135a
Implement random test order execution
2019-03-23 19:43:41 -06:00
Michael Miller
29279e1812
Implement Iterable
2019-03-23 19:42:32 -06:00
Michael Miller
d0ba2c5400
Config stores the RNG instead of a seed
2019-03-23 19:42:19 -06:00
Michael Miller
21a0f78219
Implement random generator and seed
2019-03-23 19:18:29 -06:00
Michael Miller
5d95e1b5dd
Save built-up config
2019-03-23 18:35:15 -06:00
Michael Miller
57271d5f4b
Implement --no-color option
2019-03-23 18:24:11 -06:00
Michael Miller
a7d8d35a06
Implement option for JUnit test output
2019-03-23 17:01:03 -06:00
Michael Miller
ef8b773787
Support multiple formatters at once
2019-03-23 17:00:21 -06:00
Michael Miller
f1873238cd
Add expectation values to failure
2019-03-23 16:42:53 -06:00
Michael Miller
50929c6666
Use standard status text
2019-03-23 16:34:54 -06:00
Michael Miller
ff20fbe232
Cleanup top-level formatting code
2019-03-23 16:28:36 -06:00
Michael Miller
3fbe6a2760
Implement Java naming
2019-03-23 16:27:51 -06:00
Michael Miller
93368503e6
Cleanup JUnit test case hierarchy
2019-03-23 16:07:40 -06:00
Michael Miller
3776cd917e
Initial code for JUnit output
2019-03-23 15:31:53 -06:00
Michael Miller
4890cafefa
Ability to enumerate each result in report
2019-03-23 14:44:00 -06:00
Michael Miller
4d38bf3ab2
Add secondary initializer
2019-03-23 14:38:51 -06:00
Michael Miller
edbcff03a5
Implement TAP formatter
2019-03-23 00:25:46 -06:00
Michael Miller
29dc833ea3
Add report stats, timing, and result
2019-03-22 21:48:00 -06:00
Michael Miller
dca2925461
Simplify to_json calls
2019-03-22 21:43:33 -06:00
Michael Miller
09b6dee004
Move the remaining to_json methods to their own types
2019-03-22 21:29:20 -06:00
Michael Miller
b12c1aba96
Move to_json builder methods into result classes
2019-03-22 21:23:14 -06:00
Michael Miller
c869e4fc9a
Add to_s methods for result types
2019-03-22 20:12:36 -06:00
Michael Miller
82a4a15ba9
Initial work on JSON formatter
2019-03-22 20:11:58 -06:00
Michael Miller
ba0453c5ea
Implement dry-run mode
2019-03-22 14:18:03 -06:00
Michael Miller
435f971c87
Add dry-run to config
2019-03-22 14:05:48 -06:00
Michael Miller
46e3246c5c
Fix new lines with pending tests
2019-03-22 14:00:58 -06:00
Michael Miller
acfe9d2808
Conditionally remove blank lines
2019-03-22 13:53:06 -06:00
Michael Miller
caf19ffbd8
Formatting
2019-03-22 13:49:37 -06:00
Michael Miller
748b0223af
Adjust output formatting for fail-blank mode
2019-03-22 13:48:47 -06:00
Michael Miller
209ef92d3d
Implement "fail-blank" into runner and report
2019-03-22 13:41:46 -06:00
Michael Miller
165178237c
Add dummy match data
...
Apparently the abstract bug pops up again when there are no tests.
2019-03-22 13:34:44 -06:00
Michael Miller
31d58fea25
Add "fail-blank" config option
2019-03-22 13:21:37 -06:00
Michael Miller
d22b628526
Stub remaining options from Crystal's default Spec
2019-03-22 13:15:17 -06:00
Michael Miller
a57e596a62
Add -h flag to show help
2019-03-22 13:08:32 -06:00
Michael Miller
66ac2eb080
Missing space between prefix and value
2019-03-22 13:03:33 -06:00
Michael Miller
c197f3236f
Actual values should not be prefixed
2019-03-22 13:01:55 -06:00
Michael Miller
e7e1d0e084
Change how values are passed to helper
...
Working around a segfault (dunno why this fixes it).
2019-03-22 11:53:20 -06:00
Michael Miller
d705ef657c
Update specs to handle new match data values
2019-03-22 11:41:39 -06:00
Michael Miller
31acc707dc
Fix stringified inspection of generic match data value
2019-03-22 11:04:11 -06:00
Michael Miller
5e80b3835a
MatchDataValue must be a class
...
Negatable value modifiers don't get updated when they're structs.
2019-03-22 11:01:47 -06:00
Michael Miller
a19d9f00aa
Update formatters to handle new labeled values
2019-03-22 11:00:00 -06:00
Michael Miller
92b407380b
Fix negation of values in Expectation
2019-03-22 10:57:53 -06:00
Michael Miller
33841e8888
Sub-type value modifier from MatchDataValue
...
This includes renaming the types.
2019-03-22 10:55:57 -06:00
Michael Miller
4f6309a032
Rename values to named_tuple in match data types
2019-03-22 10:41:23 -06:00
Michael Miller
8d3ab0d44c
Transform named tuple match data to array
...
Trying to keep some of the existing code (and better syntax).
2019-03-22 10:38:09 -06:00
Michael Miller
66bd1555ac
Use Symbol instead of String
2019-03-22 10:35:43 -06:00
Michael Miller
0b467012cb
Initial work on match data values management
2019-03-22 10:30:03 -06:00
Michael Miller
dba047e1ec
Formatting
2019-03-22 00:16:09 -06:00
Michael Miller
a804907f75
Add text to output for fail-fast
2019-03-22 00:14:36 -06:00
Michael Miller
a31d5c8b5b
Implement fail-fast in runner
...
Report tracks number of omitted tests due to abort.
2019-03-22 00:05:53 -06:00
Michael Miller
9e63c20df2
Add fail-fast to config
2019-03-21 23:40:00 -06:00
Michael Miller
fe81586527
Pass builder instead of individual arguments
...
Config members will get large.
Preventing a large amount of arguments in advance.
2019-03-21 23:03:13 -06:00
Michael Miller
244947a81d
Wrap stringified block with back-ticks
2019-03-21 21:21:05 -06:00
Michael Miller
4a887bb906
Add DSL for expect_raises
2019-03-21 21:18:36 -06:00
Michael Miller
f3ef2e561e
Initial implementation of raise_error matcher
2019-03-21 21:10:16 -06:00
Michael Miller
72ccafb8b7
Pass subject to proc via partial
2019-03-21 21:09:46 -06:00
Michael Miller
e552cbffd2
Fix DSL usage of BlockExpectationPartial
2019-03-19 21:20:23 -06:00
Michael Miller
33e3b5a811
Use {{yield}} only in methods
...
The {{yield}} expression wraps the block with "begin ... end".
For some reason classes and modules can be defined in a "begin ... end"
block, but that might change.
2019-03-10 06:42:51 -06:00
Michael Miller
0ca0ba0a55
Fix tests to account for negation wrappers
2019-03-07 16:12:23 -07:00
Michael Miller
37f2ce99a3
Simplify negated usage and expose value
2019-03-07 15:34:55 -07:00
Michael Miller
ee7a91c3dd
Add negation wrappers
...
Fixes the reported expected values when the expectation is negated.
2019-03-06 21:39:28 -07:00
Michael Miller
018e3232cd
Update RangeMatcher to use MatchData
...
There is a compilation error.
It appears that since the last Matcher#match method has been
implemented,
Crystal is finally grouping all of the NamedTuples together.
2019-03-06 15:01:00 -07:00
Michael Miller
acf52e1553
Pass through prefixed value #inspect method
2019-03-06 14:30:46 -07:00
Michael Miller
fbee1d9461
Update RegexMatcher to use MatchData
2019-03-06 13:10:16 -07:00