Skip to content

Instantly share code, notes, and snippets.

Last active December 23, 2015 00:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Initial implementation of self-testing ManaMana (Do doo be-do-do!). I think it's cool that I can do this now. On the other hand, the .tdsl file below feels like an extra/unnecessary step. Clearly, ManaMana, is not well suited as a unit-testing tool which is fine because, when I wrote the gem, I imagined its use as an acceptance tool for a web ap…
RDSL Lexer
* It tokenizes
This is a group name
[:GROUP, {:value=>"This is a group name", :offset=>7}]
Test Case:
It tokenizes ```(.+)``` into ```(.+)```
* Source = $1
* Tokens = $2
* Tokenized <Source> must equal <Tokens>
step /^Tokenized (.+) must equal (.+)$/ do |source, tokens_str|
output =
tokens = eval tokens_str
output.must_equal tokens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment