Skip to content
Browse files

Fixed bug with module name determination in OpenRSpecFile.py

  • Loading branch information...
1 parent 5a0561b commit 865cf58d0515dbbae0cdb9bc4b08ff31cdd07a6a @barneywilliams barneywilliams committed Jul 21, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 OpenRSpecFile.py
View
6 OpenRSpecFile.py
@@ -16,7 +16,8 @@ def run(self, option):
current_file = re.search(r"([\w\.]+)$", current_file_path).group(1)
base_name = re.search(r"(\w+)\.(\w+)$", current_file).group(1)
- base_name = re.sub('_spef.rb', '', base_name)
+ base_name = re.sub('_spec', '', base_name)
+ print base_name
source_matcher = re.compile("[/\\\\]" + base_name + "\.rb$")
test_matcher = re.compile("[/\\\\]" + base_name + "_spec\.rb$")
@@ -48,11 +49,12 @@ def run(self, option):
window.focus_view(v)
def open_project_file(self, file_matcher, window, auto_set_view=-1):
+ print file_matcher
for root, dirs, files in os.walk(window.folders()[0]):
for f in files:
if re.search(r"\.rb$", f):
cur_file = os.path.join(root, f)
- print "Assessing: " + cur_file
+ # print "Assessing: " + cur_file
if file_matcher.search(cur_file):
file_view = window.open_file(os.path.join(root, f))
if auto_set_view >= 0: # don't set the view unless specified

0 comments on commit 865cf58

Please sign in to comment.
Something went wrong with that request. Please try again.