def process_rspecs( self ): # # Look for RSpecs at the root of the view. Multiple RSpecs are # prohibited unless one of them ends up importing all of the others # (directly or indirectly). # # Collect all rspecs rspec_path_list = list() root_files = os.listdir( self.localPath ) rspec = None for f in root_files: root, ext = os.path.splitext( f ) if ext.lower() == '.rspec': rspec_path = os.path.join(self.getRoot(), f ) if rspec == None: rspec = RSpecFile( rspec_path, parent=None, view=self, wipe_cache=True) else: userErrorExit("Only one rspec is allowed at the root of the view.") if rspec == None: userErrorExit("No RSpec found in view") infoMessage("Using RSpec: '%s'"%(rspec.getFilename()), 2) self.setRSpec( rspec )