Skip to content

Commit

Permalink
Align snippet comment with Cucumber-Ruby/JVM (close #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
Expand Up @@ -297,7 +297,7 @@ def assert_suggested_step_definition_snippet(stepdef_keyword, stepdef_pattern, p
params = params.join ", " params = params.join ", "
expected_snippet = <<-EOF expected_snippet = <<-EOF
this.#{stepdef_keyword}(/#{stepdef_pattern}/, function (#{params}) { 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(); callback.pending();
}); });
EOF EOF
Expand Down
Expand Up @@ -43,7 +43,7 @@ Syntax.prototype = {
getQuotedStringMatchingGroup: function() { getQuotedStringMatchingGroup: function() {
return '"([^"]*)"'; return '"([^"]*)"';
}, },

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


getStepDefinitionEndComment: function() { 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
Expand Up @@ -12,7 +12,7 @@ describe("Cucumber.SupportCode.StepDefinitionSnippetBuilder", function() {
getStepDefinitionStart : 'this.', getStepDefinitionStart : 'this.',
getStepDefinitionInner1 : '(', getStepDefinitionInner1 : '(',
getStepDefinitionInner2 : ', function(', 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', getContextStepDefinitionFunctionName : 'Given',
getEventStepDefinitionFunctionName : 'When', getEventStepDefinitionFunctionName : 'When',
getOutcomeStepDefinitionFunctionName : 'Then', getOutcomeStepDefinitionFunctionName : 'Then',
Expand Down Expand Up @@ -65,7 +65,7 @@ describe("Cucumber.SupportCode.StepDefinitionSnippetBuilder", function() {
pattern + pattern +
", function(" + ", function(" +
parameters + 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); expect(actualSnippet).toBe(expectedSnippet);
}); });
}); });
Expand Down Expand Up @@ -135,7 +135,7 @@ describe("Cucumber.SupportCode.StepDefinitionSnippetBuilder", function() {
spyOnStub(step, 'getName').andReturn(stepName); spyOnStub(step, 'getName').andReturn(stepName);
spyOnStub(step, 'isOutlineStep'); spyOnStub(step, 'isOutlineStep');
spyOnStub(Cucumber.Util.RegExp, 'escapeString').andReturn(escapedStepName); spyOnStub(Cucumber.Util.RegExp, 'escapeString').andReturn(escapedStepName);
spyOn(snippetBuilder, 'parameterizeStepName').andReturn(parameterizedStepName); spyOn(snippetBuilder, 'parameterizeStepName').andReturn(parameterizedStepName);
}); });


it("gets the step name", function() { it("gets the step name", function() {
Expand Down
Expand Up @@ -3,7 +3,7 @@ require('../../support/spec_helper');
describe('Cucumber.SupportCode.StepDefinitionSnippetBuilderSyntax', function () { describe('Cucumber.SupportCode.StepDefinitionSnippetBuilderSyntax', function () {
var Cucumber = requireLib('cucumber'); var Cucumber = requireLib('cucumber');
var Syntax = Cucumber.SupportCode.StepDefinitionSnippetBuilderSyntax; 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) { 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.