Create a test DSL to test the DSL

time to read 1 min | 87 words

Yesterday I asked how we can efficiently test this piece of code:

specification @vacations:
	requires @scheduling_work
	requires @external_connections

Trying to test that with C# code resulted in 1500% disparity in number of lines of code. Obviously a different approach was needed. Since I am in a DSL state of mind, I wrote a test DSL for this:

script "quotes/"

with @vacations:
	should_require @scheduling_work
	should_require @external_connections	

with @scheduling_work:

I like this.

You can take a look at the code here.