Skip to content

Instantly share code, notes, and snippets.

@pjlsergeant
Created December 24, 2011 16:39
Show Gist options
  • Select an option

  • Save pjlsergeant/1517743 to your computer and use it in GitHub Desktop.

Select an option

Save pjlsergeant/1517743 to your computer and use it in GitHub Desktop.
"Type::warehouse": {
"constraint": create_enum('WH1', 'WH2'),
"cucumber": {
"type": "Given",
"match" : qr/the warehouse is "(WH\d)"/,
"describe": "the warehouse is \"{0}\"",
}
},
"Type::product_measurable": {
"constraint": "Type::Bool",
"cucumber": {
"type": "When",
"match": [
qr/the product (is (not )?) measurable/,
function (m) { return m == 'is ' }
],
"describe": function (m) {
return "the product is " . ( m ? '' : 'not ' ) . "measurable";
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment