Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Benson Perry committed Sep 20, 2013
1 parent 24a29ba commit 40fbd69
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
30 changes: 25 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,28 @@ module.exports = function (grunt) {
}
},
cucumberjs: {
files: 'features',
options: {
steps: 'features/step_definitions',
format: 'pretty'
test1: {
files: 'features',
options: {
steps: 'features/step_definitions',
format: 'pretty'
}
},
test2: {
files: 'features',
options: {
steps: 'features/step_definitions',
format: 'pretty',
tags: '@tag'
}
},
test3: {
files: 'features',
options: {
steps: 'features/step_definitions',
format: 'pretty',
tags: ['~@wip', '@tag']
}
}
}
});
Expand All @@ -21,5 +39,7 @@ module.exports = function (grunt) {

grunt.loadTasks('tasks');

grunt.registerTask('default', ['jshint', 'cucumberjs']);
grunt.registerTask('default', ['jshint', 'cucumberjs:test1']);

grunt.registerTask('tag-tests', ['cucumberjs:test2', 'cucumberjs:test3'])
};
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ this represents boolean NOT. Example:
by a comma, which represents logical OR. Example:
`tags: '@dev,@wip'`

To represent a logcal AND, use an array.
To represent a logical AND, use an array.
This is useful if you want to skip certain features
and run other specific (tagged) features. Example:
and run other specific features. Example:
`tags: ['~@wip', '@dev']`

#### format
Expand Down
2 changes: 1 addition & 1 deletion tasks/cucumber-js-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = function (grunt) {
}

if (! _.isEmpty(tags)) {
if (typeof tags == "string") {
if (typeof tags === "string") {
tags = [tags];
}
for (var i=0; i < tags.length; i++) {
Expand Down

0 comments on commit 40fbd69

Please sign in to comment.