lib/testrbl.rb in testrbl-0.1.8 vs lib/testrbl.rb in testrbl-0.1.9

- old
+ new

@@ -12,10 +12,12 @@ Regexp.new("[^[[:word:]]]+") else /\W+/u end + INTERPOLATION = /\\\#\\\{.*?\\\}/ + def self.run_from_cli(argv) command = argv.join(" ") if command =~ /^\S+:\d+$/ file, line = argv.first.split(':') file = "./#{file}" if file =~ /^[a-z]/ # fix 1.9 not being able to load local files @@ -56,10 +58,10 @@ def self.pattern_from_line(line) PATTERNS.each do |r| if line =~ r whitespace, method, test_name = $1, $2, $3 - regex = Regexp.escape(test_name).gsub("'",".").gsub("\\ "," ") + regex = Regexp.escape(test_name).gsub("'",".").gsub("\\ "," ").gsub(INTERPOLATION, ".*") if method == "should" regex = "#{method} #{regex}\. $" elsif method == "test" # test "xxx -_ yyy"