Skip to content

Commit

Permalink
Updated StepDefinitionSnippetBuilder spec file.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngeorgewright committed Sep 13, 2012
1 parent db0b8c3 commit bdbf7a6
Showing 1 changed file with 18 additions and 1 deletion.
Expand Up @@ -8,7 +8,24 @@ describe("Cucumber.SupportCode.StepDefinitionSnippetBuilder", function() {

beforeEach(function() {
step = createSpy("step");
snippetBuilder = Cucumber.SupportCode.StepDefinitionSnippetBuilder(step);
syntax = createSpyWithStubs("step syntax", {
getStepDefinitionStart : 'this.',
getStepDefinitionInner1 : '(',
getStepDefinitionInner2 : ', function(',
getStepDefinitionEnd : ") {\n // express the regexp above with the code you wish you had\n callback.pending();\n});\n",
getContextStepDefinitionFunctionName : 'Given',
getEventStepDefinitionFunctionName : 'When',
getOutcomeStepDefinitionFunctionName : 'Then',
getNumberMatchingGroup : '(\\d+)',
getQuotedStringMatchingGroup : '"([^"]*)"',
getFunctionParameterSeparator : ', ',
getStepDefinitionDocString : 'string',
getStepDefinitionDataTable : 'table',
getStepDefinitionCallback : 'callback',
getPatternStart : '/^',
getPatternEnd : '$/'
});
snippetBuilder = Cucumber.SupportCode.StepDefinitionSnippetBuilder(step, syntax);
});

describe("buildSnippet()", function() {
Expand Down

0 comments on commit bdbf7a6

Please sign in to comment.