Sha256: 748aba0d951097ffbb05a073a5a6cc4ec5903f325ce24f2dd9307964ba99b899
Contents?: true
Size: 716 Bytes
Versions: 3
Compression:
Stored size: 716 Bytes
Contents
namespace :cuke_pack do desc "Raise an exception if any tasks are marked @wip" task :any_wip do require 'gherkin/parser/parser' require 'gherkin/formatter/json_formatter' require 'gherkin/formatter/tag_count_formatter' io = StringIO.new counts = {} json_formatter = Gherkin::Formatter::JSONFormatter.new(io) formatter = Gherkin::Formatter::TagCountFormatter.new(json_formatter, counts) parser = Gherkin::Parser::Parser.new(formatter) Dir['features/**/*.feature'].each do |file| parser.parse(File.read(file), file, 0) end if counts['@wip'] raise StandardError.new("@wip occurred in the following files:\n#{counts['@wip'].join("\n")}") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cuke-pack-0.0.3 | lib/cuke-pack/tasks/any_wip.rb |
cuke-pack-0.0.2 | lib/cuke-pack/tasks/any_wip.rb |
cuke-pack-0.0.1 | lib/cuke-pack/tasks/any_wip.rb |