Permalink
Browse files

Feature so that MochaDetectFileTypeCommand validates files in a direc…

…tory beginning by 'test' and not only directories named 'test'
  • Loading branch information...
1 parent bf91357 commit 38d5281add780bcaf56d19c78a6eda1e51a936c3 Ben committed Aug 31, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 DetectMochaTest.py
View
@@ -12,8 +12,8 @@ def on_load(self, view):
return
name = os.path.basename(filename.lower())
- dirname = os.path.dirname(filename.lower())
- if dirname[-4:] == "test":
+ dirname = os.path.dirname(filename.lower()).rpartition('/')[2]
+ if dirname[:4] == "test":
set_syntax(view, "Mocha", "Mocha")

0 comments on commit 38d5281

Please sign in to comment.