Commit graph

413 commits

Author SHA1 Message Date
Michael Miller
a88c6545d9 Mark comparison matchers as complete 2019-01-25 13:53:14 -07:00
Michael Miller
12864492b7 Add spec for range modifier methods 2019-01-25 13:52:41 -07:00
Michael Miller
90c5364946 Can't use "new" by itself like in Ruby 2019-01-25 13:25:40 -07:00
Michael Miller
abc321130a Add DSL for range matching 2019-01-25 13:20:38 -07:00
Michael Miller
3be2302df9 Add range modifier methods 2019-01-25 13:20:17 -07:00
Michael Miller
ac08806010 Add spec for RangeMatcher 2019-01-25 13:12:34 -07:00
Michael Miller
bc45a3bf41 Add basic range matcher 2019-01-25 13:00:19 -07:00
Michael Miller
154832e5c4 Add be_an variation of be_a 2019-01-25 11:21:41 -07:00
Michael Miller
6a91b3e399 Formatting 2019-01-25 11:09:11 -07:00
Michael Miller
e33ce5c182 Implement remaining pending tests 2019-01-25 11:08:57 -07:00
Michael Miller
6665e4d396 Implement some pending tests 2019-01-24 22:36:05 -07:00
Michael Miller
cbb4c18668 Formatting 2019-01-23 23:16:18 -07:00
Michael Miller
a869d4f23f More pending tests to implement 2019-01-23 23:14:34 -07:00
Michael Miller
f0a972ed06 Start on some condition tests 2019-01-23 23:01:16 -07:00
Michael Miller
c31557e8ff Move everything in BeComparison to TruthyMatcher
This is to match RSpec's ability to use "be" by itself.
For instance: `expect(foo).to be`
2019-01-23 22:10:03 -07:00
Michael Miller
28c13cd175 Add xit to DSL 2019-01-23 21:57:16 -07:00
Michael Miller
e746ede287 Add specify to DSL 2019-01-23 21:56:02 -07:00
Michael Miller
0c284b6713 Add other comparison matchers to DSL 2019-01-23 21:45:16 -07:00
Michael Miller
2758ba7643 Add spec for BeComparison 2019-01-23 21:36:52 -07:00
Michael Miller
f09aaf59e6 Formatting 2019-01-23 21:11:01 -07:00
Michael Miller
06ee53a7b6 Add spec for GreaterThanEqualMatcher 2019-01-23 21:10:17 -07:00
Michael Miller
e3d9b55ae7 Add spec for GreaterThanMatcher 2019-01-23 21:08:52 -07:00
Michael Miller
99991de2da Add spec for LessThanEqualMatcher 2019-01-23 21:05:50 -07:00
Michael Miller
06bb969061 Add spec for LessThanMatcher 2019-01-23 21:03:44 -07:00
Michael Miller
d86b9dad11 Add spec for InequalityMatcher 2019-01-23 21:02:44 -07:00
Michael Miller
73c4334246 Use macros to create methods for all watched operators 2019-01-23 21:02:32 -07:00
Michael Miller
d02e5d33b4 Add inequality matcher 2019-01-23 20:39:52 -07:00
Michael Miller
93801553b6 Implement equality method for BeComparison 2019-01-23 20:38:23 -07:00
Michael Miller
9ccba7570e Add greater-than-equal-to matcher 2019-01-23 20:37:33 -07:00
Michael Miller
ea6d7eac2a Add greater-than matcher 2019-01-23 20:34:53 -07:00
Michael Miller
52d0e6d55e Add less-than-equal-to matcher 2019-01-23 20:33:21 -07:00
Michael Miller
4ccc27321e Add less-than matcher 2019-01-23 20:31:28 -07:00
Michael Miller
f7d5c27e65 Should be ExpectedType instead of ActualType 2019-01-23 20:25:06 -07:00
Michael Miller
b93ef1fd2d Initial structure for "be OP value" syntax 2019-01-23 17:17:45 -07:00
Michael Miller
57c15b9088 Split #expects macro 2019-01-23 16:48:12 -07:00
Michael Miller
78698d2de9 Can't support multiple arguments (expected values)
The macro would only "attach" `.to` to the last partial.
2019-01-23 16:43:59 -07:00
Michael Miller
17c66dd732 Split #expect macro
TIL Crystal supports macro overloading, the argument count must be
different.
2019-01-23 16:42:17 -07:00
Michael Miller
046d946669 Handle case of missing block body for #given better 2019-01-23 16:31:54 -07:00
Michael Miller
8297152c36 Mark truthy matchers as complete 2019-01-23 16:08:41 -07:00
Michael Miller
3d4d8f67be Document truthy flag 2019-01-23 16:07:26 -07:00
Michael Miller
95b0563f73 Add spec for TruthyMatcher 2019-01-23 16:06:18 -07:00
Michael Miller
a827b191a1 Use #actual instead of #value 2019-01-23 16:05:59 -07:00
Michael Miller
8c6552a995 Add DSL for be_truthy and be_falsey 2019-01-23 15:51:52 -07:00
Michael Miller
9befd5ee4f Add truthy matcher 2019-01-23 15:51:36 -07:00
Michael Miller
429c2d7302 Add #be_true and #be_false to DSL 2019-01-23 15:35:32 -07:00
Michael Miller
0af3efea2a Document pre- and post-condition run methods
Mark pre- and post-condition functionality complete in README.
2019-01-23 15:15:01 -07:00
Michael Miller
2f5e59d88b Fix failing test
Pre-conditions with parent running out-of-order.
2019-01-23 15:13:27 -07:00
Michael Miller
41729217bb Add tests for pre- and post-conditions in groups 2019-01-23 15:12:09 -07:00
Michael Miller
37c45eb285 Shorten pre and post usage 2019-01-23 14:46:15 -07:00
Michael Miller
ed8fad2c97 Add documentation for pre- and post-conditions 2019-01-23 14:37:43 -07:00