Skip to content

Instantly share code, notes, and snippets.

@gor-sg
Created November 12, 2014 08:24
Show Gist options
  • Select an option

  • Save gor-sg/8b23ab6bc27e7f891415 to your computer and use it in GitHub Desktop.

Select an option

Save gor-sg/8b23ab6bc27e7f891415 to your computer and use it in GitHub Desktop.
Regexps for tests
(?<!#)\s([^\s]+)\.should_not
expect(\1).not_to
(?<!#)\s([^\s]+)\.should
expect(\1).to
( +)(.+)\.should
\1expect(\2).to
"([^#\n"]+)"
'\1'
== (?:'|")([^"']+)(?:'|")
eq('\1')
\{(?![\s]{1})
{
(?<![\s]{1})\}
}
:([\w]+)[\s]+=>
\1:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment