Commit graph

484 commits

Author SHA1 Message Date
Michael Miller
101489ea19 Add spec for ExampleHooks 2018-11-19 22:51:59 -07:00
Michael Miller
d576e4a1fa Missing # prefix for #to_not and #not_to 2018-11-19 22:00:45 -07:00
Michael Miller
ee274dbebd Add docs for ExampleGroup 2018-11-19 21:52:10 -07:00
Michael Miller
e79d8872ac Cleanup indexer code 2018-11-19 19:41:51 -07:00
Michael Miller
072055d947 Change test wrapper to a struct 2018-11-17 00:14:14 -07:00
Michael Miller
d52be1ec50 Add docs for ExampleHooks 2018-11-16 13:56:43 -07:00
Michael Miller
05c3a75683 Add specs for result types 2018-11-16 11:39:07 -07:00
Michael Miller
ee2491fef8 Down-cast to preven type issues when inferring arrays 2018-11-16 11:38:50 -07:00
Michael Miller
c045305bd2 Add docs for result types 2018-11-16 09:48:35 -07:00
Michael Miller
195e34d360 Add tests for #to and #to_not 2018-11-14 13:10:42 -07:00
Michael Miller
49deb96a11 Capture harness in spy example 2018-11-14 12:58:32 -07:00
Michael Miller
4a531bd83f Move PassingExample to its own file
Missed this one when moving code around before.
2018-11-14 12:55:21 -07:00
Michael Miller
f0204a32ea Fix specs to work with new Expectation type 2018-11-14 02:15:55 -07:00
Michael Miller
35b59854ec Move #eval to partial 2018-11-13 21:44:56 -07:00
Michael Miller
a3ac50d661 Update harness to match recent changes 2018-11-13 21:44:25 -07:00
Michael Miller
a66262d197 Rename ExpectationResults to ExampleExpectations
Update to use new Expectation type.
2018-11-13 15:59:51 -07:00
Michael Miller
b625cb69cf Adopt partials to use new Expectation type 2018-11-13 14:17:37 -07:00
Michael Miller
718f24aef3 Adopt ValueMatcher to new Expectation type 2018-11-13 14:11:51 -07:00
Michael Miller
06ced9f799 Change Expectation to store the result
This removes Expectation::Result and uses Expectation and sub-types
instead.
Having two "Result" types is confusing.
2018-11-13 14:08:27 -07:00
Michael Miller
e38747eafd Formatting 2018-11-13 10:08:56 -07:00
Michael Miller
6c882f9cae Remove ExampleGroup#all_examples
Implement the same functionality with ExampleIterator.
2018-11-13 10:08:37 -07:00
Michael Miller
b5a18ad324 Implement example iterator 2018-11-13 10:06:43 -07:00
Michael Miller
66dcc21383 Move helper methods and classes to their own directory 2018-11-09 11:20:30 -07:00
Michael Miller
0e1d87d8d4 Add docs for #it and #pending 2018-11-08 22:40:01 -07:00
Michael Miller
45230f3e67 Add docs for before, after, and around hooks 2018-11-08 13:31:50 -07:00
Michael Miller
cbfd14a88f Add docs for #subject, #let, and #let! 2018-11-08 11:29:51 -07:00
Michael Miller
e480901cdc Note about nested #given blocks
Remove unused and empty type method.
Crystal syntax doesn't allow methods where a generic type is expected.
2018-11-07 13:03:48 -07:00
Michael Miller
013f799c5e Remove #include_examples placeholder
Will be re-added when it is implemented.
2018-11-07 12:58:47 -07:00
Michael Miller
3abb48fe53 Allow implicit subject to take arbitrary arguments
This allows easy construction of the subject when it has an initializer
with parameters.
2018-11-07 12:55:38 -07:00
Michael Miller
4e690e7906 Merge described class and implicit subject macros
These macros are only called once.
2018-11-07 12:53:22 -07:00
Michael Miller
665c202848 Removes #it_behaves_like placeholder
Will re-add this when it is implemented.
2018-11-07 12:49:10 -07:00
Michael Miller
3571d9463a Remove #_spectator_given_collection macro
It is no longer needed since @type resolution isn't delayed.
2018-11-07 12:47:42 -07:00
Michael Miller
06743a181c Move collection class out of given module
The collection would incorrectly have access to the `given` block's
context,
instead of just the parent context, like it should.
2018-11-07 12:33:49 -07:00
Michael Miller
69905c01f3 Add docs for #given 2018-11-07 12:26:47 -07:00
Michael Miller
bf03cf03ce Add docs for #describe and #context 2018-11-06 14:05:41 -07:00
Michael Miller
0efaf9fa85 Formatting 2018-11-03 12:14:29 -06:00
Michael Miller
0a218b7e9f Some initial documentation for StructureDSL 2018-11-03 12:13:53 -06:00
Michael Miller
f6d6c859e6 Add docs for example and matcher DSL 2018-11-02 20:48:36 -06:00
Michael Miller
2f525d49ef Add spec for GivenExampleGroupBuilder 2018-11-02 20:17:59 -06:00
Michael Miller
14ee762ad7 Add test for value of "what"
Minor changes to remove unused parts.
2018-11-02 18:23:04 -06:00
Michael Miller
7c21f1e3eb Store user-friendly name of given variable 2018-11-02 18:11:46 -06:00
Michael Miller
c8609ab609 Formatting 2018-11-02 15:35:57 -06:00
Michael Miller
7ce732a828 Add spec for NestedExampleGroupBuilder 2018-11-02 15:35:50 -06:00
Michael Miller
1657518deb Add spec for RootExampleGroupBuilder 2018-11-02 15:28:51 -06:00
Michael Miller
6f5c269fcc Add goal to README 2018-11-02 14:32:36 -06:00
Michael Miller
61fe8e06d9 Change accessibility of children getter to public 2018-11-02 13:35:32 -06:00
Michael Miller
ffdc0c40ac Add spec for ExampleFactory 2018-11-01 20:25:38 -06:00
Michael Miller
8e7f5cf82b Capture sample values for tests 2018-11-01 20:23:28 -06:00
Michael Miller
aea324a33b Add docs for group builders and example factory 2018-10-30 16:49:01 -06:00
Michael Miller
ee4623b471 Remove redundant #add_child method 2018-10-30 16:21:19 -06:00