def current_test(self): file_path = self.config["file_path"] if JasmineCoffeeTestFile.matches(file_path): return JasmineCoffeeTestFile(self.config) if CucumberTestFile.matches(file_path): return CucumberTestFile(self.config) if RSpecTestFile.matches(file_path, self.config["rspec_regex"]): return RSpecTestFile(self.config) return UnknownTestFile(self.config)
def test_matches(self): self.assertTrue(RSpecTestFile.matches("spics/and/specs_spec.rb", get_config()))