Beispiel #1
0
  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)
Beispiel #2
0
 def test_matches(self):
   self.assertTrue(CucumberTestFile.matches("yet/another/creature.feature"))
   self.assertFalse(CucumberTestFile.matches("hide/it/from/the.teacher"))