Commit graph

271 commits

Author SHA1 Message Date
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
Michael Miller
eb8ce6ff92 Add docs to DSL and builder 2018-10-28 18:27:54 -06:00
Michael Miller
746a5da107 Dummy example shouldn't be used 2018-10-23 11:15:22 -06:00
Michael Miller
29219c8b8c Formatting 2018-10-23 10:51:50 -06:00
Michael Miller
dbcf9ec57d Add spec for TypedValueWrapper 2018-10-23 10:49:52 -06:00
Michael Miller
c711115023 Add spec for SampleValues 2018-10-23 10:42:18 -06:00
Michael Miller
4e9cf44c2c Add and update docs for internal module 2018-10-22 16:22:35 -06:00
Michael Miller
79392fbeff Add note about sample value names 2018-10-22 16:22:11 -06:00
Michael Miller
152ad5a5bf Change Entry to a private struct 2018-10-22 11:10:54 -06:00
Michael Miller
f8fa3e706d Add #get_value method to automatically cast 2018-10-22 11:08:55 -06:00
Michael Miller
3382084f03 Implement remaining harness specs 2018-10-22 10:49:42 -06:00
Michael Miller
5a4b4817b4 More tests for the harness 2018-10-21 08:10:59 -06:00
Michael Miller
4ab97bd215 Group children must be set 2018-10-20 22:56:24 -06:00
Michael Miller
16519db9bb Rename #report_results to #generate_results 2018-10-20 20:13:47 -06:00