Commit graph

348 commits

Author SHA1 Message Date
Michael Miller
a06ea6088c Shorten GroupDefinitions to Definitions 2018-09-15 16:53:28 -06:00
Michael Miller
196187a98a Add human-friendly formatting to runtime 2018-09-15 15:45:17 -06:00
Michael Miller
d1527d8c0d Change char for pending to * 2018-09-15 14:16:10 -06:00
Michael Miller
fd547c5814 Use Time::Span.zero instead of constructor with 0 nanoseconds 2018-09-15 14:10:59 -06:00
Michael Miller
caeab6c338 Cleanup color code 2018-09-15 14:04:17 -06:00
Michael Miller
625262b6d5 Colorize result string based on outcome 2018-09-15 13:51:28 -06:00
Michael Miller
8e1a2e114b Display summary from default formatter 2018-09-15 13:51:07 -06:00
Michael Miller
b329afffb6 Rename Report to TestResults 2018-09-15 13:31:55 -06:00
Michael Miller
ac53394b8d Additional methods to describe result 2018-09-15 13:30:07 -06:00
Michael Miller
5819e0201e Shorten names of result classes 2018-09-15 13:25:11 -06:00
Michael Miller
6ca4d8d2a6 Move matchers DSL into their own module
Moves the #eq method out of the global namespace.
2018-09-15 11:58:43 -06:00
Michael Miller
1ea06998e7 Move #expect from global namespace to example DSL 2018-09-15 11:30:45 -06:00
Michael Miller
967797428c Move DSL to its own directory 2018-09-15 11:21:23 -06:00
Michael Miller
b5cdda4af3 Shorten ExpectationFailedError to ExpectationFailed 2018-09-15 11:05:11 -06:00
Michael Miller
a1871ca62e Rename StandardFormatter to DefaultFormatter 2018-09-15 10:57:49 -06:00
Michael Miller
cfe1a014dd Rename reporters to formatters 2018-09-15 10:56:58 -06:00
Michael Miller
251bf5bb5e Remove unused source type 2018-09-15 10:53:00 -06:00
Michael Miller
a3366add13 Cleanup remaining references to "context" that should be "group" 2018-09-15 10:52:17 -06:00
Michael Miller
010b47ca1f Rename ContextDefinitions to GroupDefinitions 2018-09-15 10:49:46 -06:00
Michael Miller
7968c5a394 Rename Context to ExampleGroup 2018-09-15 10:45:47 -06:00
Michael Miller
dc8e651209 Quick implementation of pending examles 2018-09-15 10:36:20 -06:00
Michael Miller
7cfa432dfd All hook types are implemented 2018-09-15 09:59:55 -06:00
Michael Miller
56229cdc93 Move common example runner code into new RunnableExample class 2018-09-14 22:17:16 -06:00
Michael Miller
e4d46ca603 Initial implementation of invoking #around_each hooks
My brain hurts. 😖
2018-09-13 10:44:21 -06:00
Michael Miller
9f778c5cb9 Fix after_all hooks running too soon 2018-09-12 21:31:44 -06:00
Michael Miller
77753ab974 Move hook execution into Example#run 2018-09-12 20:42:39 -06:00
Michael Miller
5b275f3146 Use #unsafe_as
The value can't be any other type, so this should be a safe operation.
2018-09-12 20:28:36 -06:00
Michael Miller
fbea3533ea Remove setter and extra code for given vars 2018-09-12 20:27:11 -06:00
Michael Miller
e30da2be19 Some macro cleanup 2018-09-12 19:23:27 -06:00
Michael Miller
9b07f669ed Remove Locals sub-module
This allows for seamless helper methods.
2018-09-12 19:16:41 -06:00
Michael Miller
718be70edd Update feature list 2018-09-12 19:11:36 -06:00
Michael Miller
3fc625de3f Allow generic types for #described_class and implicit #subject
Add runtime check to ensure #described_class is a type name.
2018-09-12 18:54:46 -06:00
Michael Miller
037612d00a Add implicit subject 2018-09-12 18:37:33 -06:00
Michael Miller
8cf876268a Use fresh variables 2018-09-12 16:29:48 -06:00
Michael Miller
10fc6c6a35 Hide special character mapping 2018-09-12 15:54:45 -06:00
Michael Miller
625a331745 Initial code to indirectly run example
This issolates the example code from the example class' attributes, such
as #description, #run, and others.
2018-09-12 15:47:57 -06:00
Michael Miller
700108f52f Move example-specific DSL to its own module 2018-09-12 15:41:23 -06:00
Michael Miller
4bfd2b9620 Rearrange DSL 2018-09-12 15:21:23 -06:00
Michael Miller
e451c027a8 Fix bad copy/paste for hooks 2018-09-12 15:16:18 -06:00
Michael Miller
193314d532 Fix given variables being defined in parent context 2018-09-12 15:13:46 -06:00
Michael Miller
8b55d9139d Hide constants used to build test hiearchy 2018-09-12 14:53:11 -06:00
Michael Miller
c2ee9fd520 Move ROOT_CONTEXT out of Spectator module 2018-09-11 20:25:28 -06:00
Michael Miller
6f6ba9c812 Obscure given value setter 2018-09-11 16:19:31 -06:00
Michael Miller
65e8ee3788 Fix string descriptions having extra quotes 2018-09-11 16:01:31 -06:00
Michael Miller
84ed9c41b2 Store example description 2018-09-11 15:57:18 -06:00
Michael Miller
d8621fc43e Store "what" string in context 2018-09-11 15:54:00 -06:00
Michael Miller
284e10482a Add names for most common special characters
These names will be used instead of an underscore. This helps with
naming.
2018-09-11 15:09:23 -06:00
Michael Miller
95ec999bba Hide name of underlying let's block method
This prevent's defining a bang version of the let value with the same
name.
2018-09-11 12:54:47 -06:00
Michael Miller
2c0238d178 Invoke before_each, before_all, after_each, and after_all hooks 2018-09-10 22:33:40 -06:00
Michael Miller
a725c0d5be Pass context to examples 2018-09-10 21:51:14 -06:00