public
Fork of we5/test-spec-tmbundle
Description: A Textmate bundle for Test/Spec
Clone URL: git://github.com/Lawjoskar/test-spec-tmbundle.git
Search Repo:
Sanitized any punctuation in a spec/context name to make Test/Spec's 
command line regex happy.  (Basically lets you use any punctuation you 
want in your spec/context names.)
Lawjoskar (author)
Fri Jul 11 07:46:30 -0700 2008
commit  95358c845bc8ca422a64fe0692851192006bc59f
tree    1e75647b761ef8f4c9800f8dafd2657731f5b666
parent  0e2b816358a3d360617ab40e1ae6ce328dd6eafc
...
20
21
22
 
 
 
 
23
24
25
...
20
21
22
23
24
25
26
27
28
29
0
@@ -20,6 +20,10 @@ spec = $3 || $4 if lines.find { |line| line =~ /^\s*(specify|it)\s+('(.*)'|
0
 context = $3 || $4 if lines.find { |line| line =~ /^\s*(context|describe)\s+('(.*)'|"(.*)")+\s*(,.+?)?(\{|do)/ }
0
 end
0
 
0
+# sanitize punctuation for Test/Spec command line regex
0
+spec.gsub!(/[[:punct:]]/, ".")
0
+context.gsub!(/[[:punct:]]/, ".")
0
+
0
 puts [spec, context].inspect
0
 
0
 if !spec.empty? && !context.empty?

Comments

    No one has commented yet.