コード例 #1
0
 def _find_helper_spec_files(self):
     l = finder_utils.glob_project(self.root_path,
                                   self.HELPER_SPEC_GLOB_PATTERN)
     return [
         x for x in l
         if self.pluralized_name in finder_utils.remove_base_directory(
             x, self.root_path, 'spec/helpers/')
         or self.singularized_name in finder_utils.remove_base_directory(
             x, self.root_path, 'spec/helpers/')
     ]
コード例 #2
0
 def _find_model_test_files(self):
     l = finder_utils.glob_project(self.root_path,
                                   self.MODEL_TEST_GLOB_PATTERN)
     return [
         x for x in l
         if self.pluralized_name in finder_utils.remove_base_directory(
             x, self.root_path, 'test/models/')
         or self.singularized_name in finder_utils.remove_base_directory(
             x, self.root_path, 'test/models/')
     ]
コード例 #3
0
 def _find_controller_test_files(self):
     l = finder_utils.glob_project(self.root_path,
                                   self.CONTROLLER_TEST_GLOB_PATTERN)
     return [
         x for x in l
         if self.pluralized_name in finder_utils.remove_base_directory(
             x, self.root_path, 'test/controllers/')
         or self.singularized_name in finder_utils.remove_base_directory(
             x, self.root_path, 'test/controllers/')
     ]
コード例 #4
0
 def _find_view_files(self):
     l = finder_utils.glob_project(self.root_path, self.VIEW_GLOB_PATTERN)
     return [
         x for x in l if os.path.isfile(x) and self.pluralized_name in
         finder_utils.remove_base_directory(x, self.root_path, 'app/views/')
     ]