lib/cucumber/parser/treetop_ext.rb in aslakhellesoy-cucumber-0.3.0.1 vs lib/cucumber/parser/treetop_ext.rb in aslakhellesoy-cucumber-0.3.1
- old
+ new
@@ -15,11 +15,11 @@
class Filter
def initialize(lines, options)
@lines = lines
@include_tags = options[:include_tags] || []
@exclude_tags = options[:exclude_tags] || []
- @names = options[:scenario_names] || []
+ @name_regexps = options[:name_regexps] || []
end
def accept?(syntax_node)
at_line?(syntax_node) &&
matches_tags?(syntax_node) &&
@@ -46,11 +46,11 @@
def excluded_by_tags?(syntax_node)
@exclude_tags.any? && syntax_node.has_tags?(@exclude_tags)
end
def matches_names?(syntax_node)
- @names.nil? || @names.empty? || @names.detect{|name| syntax_node.matches_name?(name)}
+ @name_regexps.nil? || @name_regexps.empty? || @name_regexps.detect{|name_regexp| syntax_node.matches_name?(name_regexp)}
end
end
module TreetopExt
FILE_COLON_LINE_PATTERN = /^([\w\W]*?):([\d:]+)$/
@@ -109,6 +109,6 @@
class CompiledParser
include Cucumber::Parser::TreetopExt
end
end
-end
\ No newline at end of file
+end