Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created February 3, 2009 06:32
Show Gist options
  • Save dchelimsky/57355 to your computer and use it in GitHub Desktop.
Save dchelimsky/57355 to your computer and use it in GitHub Desktop.
def given(name, &block)
$givens ||= {}
$givens[name] = block
end
Spec::Runner.configure do |c|
c.on_option :given do |group, value|
group.description += value
group.prepend_before $givens[value]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment