Skip to content

Commit

Permalink
Align snippet comment with Cucumber-Ruby/JVM (close cucumber#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbpros committed Mar 6, 2014
1 parent 3dfdb87 commit 087a038
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion features/step_definitions/cucumber_js_mappings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def assert_suggested_step_definition_snippet(stepdef_keyword, stepdef_pattern, p
params = params.join ", "
expected_snippet = <<-EOF
this.#{stepdef_keyword}(/#{stepdef_pattern}/, function (#{params}) {
// express the regexp above with the code you wish you had
// Write code here that turns the phrase above into concrete actions
callback.pending();
});
EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Syntax.prototype = {
getQuotedStringMatchingGroup: function() {
return '"([^"]*)"';
},

getOutlineExampleMatchingGroup: function() {
return '(.*)';
},
Expand All @@ -53,7 +53,7 @@ Syntax.prototype = {
},

getStepDefinitionEndComment: function() {
return 'express the regexp above with the code you wish you had';
return 'Write code here that turns the phrase above into concrete actions';
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("Cucumber.SupportCode.StepDefinitionSnippetBuilder", function() {
getStepDefinitionStart : 'this.',
getStepDefinitionInner1 : '(',
getStepDefinitionInner2 : ', function(',
getStepDefinitionEnd : ") {\n // express the regexp above with the code you wish you had\n callback.pending();\n});\n",
getStepDefinitionEnd : ") {\n // Write code here that turns the phrase above into concrete actions\n callback.pending();\n});\n",
getContextStepDefinitionFunctionName : 'Given',
getEventStepDefinitionFunctionName : 'When',
getOutcomeStepDefinitionFunctionName : 'Then',
Expand Down Expand Up @@ -65,7 +65,7 @@ describe("Cucumber.SupportCode.StepDefinitionSnippetBuilder", function() {
pattern +
", function(" +
parameters +
") {\n // express the regexp above with the code you wish you had\n callback.pending();\n});\n";
") {\n // Write code here that turns the phrase above into concrete actions\n callback.pending();\n});\n";
expect(actualSnippet).toBe(expectedSnippet);
});
});
Expand Down Expand Up @@ -135,7 +135,7 @@ describe("Cucumber.SupportCode.StepDefinitionSnippetBuilder", function() {
spyOnStub(step, 'getName').andReturn(stepName);
spyOnStub(step, 'isOutlineStep');
spyOnStub(Cucumber.Util.RegExp, 'escapeString').andReturn(escapedStepName);
spyOn(snippetBuilder, 'parameterizeStepName').andReturn(parameterizedStepName);
spyOn(snippetBuilder, 'parameterizeStepName').andReturn(parameterizedStepName);
});

it("gets the step name", function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require('../../support/spec_helper');
describe('Cucumber.SupportCode.StepDefinitionSnippetBuilderSyntax', function () {
var Cucumber = requireLib('cucumber');
var Syntax = Cucumber.SupportCode.StepDefinitionSnippetBuilderSyntax;
var stepDefinitionEndComment = 'express the regexp above with the code you wish you had';
var stepDefinitionEndComment = 'Write code here that turns the phrase above into concrete actions';

function testBaseSyntax(syntax) {

Expand Down Expand Up @@ -143,4 +143,3 @@ describe('Cucumber.SupportCode.StepDefinitionSnippetBuilderSyntax', function ()
});
});
});

0 comments on commit 087a038

Please sign in to comment.