Index: pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart |
diff --git a/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart |
index 8a80be259c092762562e9c2cb5f1825d7d72c7f7..590a1ce140afe3c32c750ded8664fbbdae2c5fe3 100644 |
--- a/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart |
+++ b/pkg/scheduled_test/lib/src/descriptor/nothing_descriptor.dart |
@@ -27,10 +27,9 @@ class NothingDescriptor extends Descriptor { |
if (parent == null) parent = defaultRoot; |
var fullPath = path.join(parent, name); |
if (new File(fullPath).existsSync()) { |
- throw "Expected nothing to exist at '$fullPath', but found a file."; |
+ fail("Expected nothing to exist at '$fullPath', but found a file."); |
} else if (new Directory(fullPath).existsSync()) { |
- throw "Expected nothing to exist at '$fullPath', but found a " |
- "directory."; |
+ fail("Expected nothing to exist at '$fullPath', but found a directory."); |
} else { |
return; |
} |