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
Michael Miller
532a314441
Add methods to force failure
2018-10-19 21:09:17 -06:00
Michael Miller
686304f31d
Insert example failed exception
2018-10-19 20:58:14 -06:00
Michael Miller
2992a18992
Some initial specs for the harness
2018-10-19 20:30:27 -06:00
Michael Miller
9cf82928b7
Ensure harness is reset on error
2018-10-19 18:52:00 -06:00
Michael Miller
c48467f783
Slightly better wording and naming
2018-10-19 18:50:21 -06:00
Michael Miller
36071fcdbf
Sanity check on expectations
2018-10-19 18:20:42 -06:00
Michael Miller
67e192edc6
Implement ExpectationResults specs and fix typo
2018-10-19 16:27:59 -06:00
Michael Miller
703a791f78
Formatting changes
2018-10-19 14:02:27 -06:00
Michael Miller
6e012da766
Add GitLab CI config
2018-10-19 14:00:08 -06:00
Michael Miller
1064444f15
DRY up code by adding expectation helper methods
2018-10-19 13:54:32 -06:00
Michael Miller
440a2c6643
Structure for ExpectationResults spec
2018-10-19 13:28:44 -06:00
Michael Miller
0892a073fe
Change Result to a class
...
This is to get around a segfault.
I'm unable to reproduce this in a simpler example at this time.
However, this can be worked around by changing from a struct to a class.
Relevant backtrace:
Invalid memory access (signal 11) at address 0x4
[0x4829f6] *CallStack::print_backtrace:Int32 +118
[0x46de7d] __crystal_sigfault_handler +61
[0x7fe6ec64b390] ???
[0x486df5] *String#==<String>:Bool +37
[0x509ac4] *Spectator::Expectations::ValueExpectationPartial(Int32) +52
[0x50a52e] *Spectator::Expectations::ValueExpectation(Int32, Int32) +94
[0x50acb2] *Spectator::Expectations::Expectation::Result +210
[0x4fcd9b] *Spectator::Expectations::ExpectationResults +635
[0x50c9eb]*Spec::ContainExpectation(Spectator::Expectations::Expectation::Result)+43
[0x4fcaea] *Spectator::Expectations::ExpectationResults +138
...
2018-10-19 13:04:51 -06:00
Michael Miller
7d08d38659
Add specs for ExpectationReporter
...
There is currently a segfault with this test code.
The issue will be addressed in the next commit.
2018-10-19 13:03:13 -06:00
Michael Miller
15ac60b17b
Remove unecessary #to_s calls
2018-10-19 11:01:22 -06:00
Michael Miller
7f4690b042
Secondary initializer for missing label
...
Label is set to actual/expected stringified value if omitted.
2018-10-18 21:52:00 -06:00
Michael Miller
9a77f8b7fd
Add specs for value expectation
...
Fix bug in expectation result actual message.
2018-10-18 17:54:43 -06:00
Michael Miller
bc66016c42
Add specs for equality matcher
2018-10-18 13:46:12 -06:00
Michael Miller
3196b724bf
Some initial specs for expectation partials
2018-10-15 15:45:32 -06:00
Michael Miller
df36331132
Workaround for Crystal compiler bug
...
See: https://github.com/crystal-lang/crystal/issues/4225
If there are no concrete implementations of a class, an "undefined
method" error is given for abstract methods.
2018-10-15 15:27:05 -06:00
Michael Miller
c77a85c97a
Flag to disable running tests
...
This is needed for testing Spectator.
2018-10-15 00:32:29 -06:00
Michael Miller
cd86687dfb
Handle negative indices
2018-10-14 19:33:38 -06:00
Michael Miller
155e9ec81a
Store example count instead of recalculating
2018-10-14 19:08:07 -06:00
Michael Miller
bcb68a5856
Implement example lookup by index
...
This will be used later for executing tests in random order.
2018-10-14 19:06:02 -06:00