Permalink
Browse files

Align snippet comment with Cucumber-Ruby/JVM (close #150)

  • Loading branch information...
1 parent 3dfdb87 commit 087a038019bca2cc5af58248f446ce4eba945008 @jbpros jbpros committed Mar 6, 2014
@@ -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
@@ -43,7 +43,7 @@ Syntax.prototype = {
getQuotedStringMatchingGroup: function() {
return '"([^"]*)"';
},
-
+
getOutlineExampleMatchingGroup: function() {
return '(.*)';
},
@@ -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';
}
};
@@ -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',
@@ -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);
});
});
@@ -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() {
@@ -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) {
@@ -143,4 +143,3 @@ describe('Cucumber.SupportCode.StepDefinitionSnippetBuilderSyntax', function ()
});
});
});
-

0 comments on commit 087a038

Please sign in to comment.