Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: test/validator/pubspec_test.dart

Issue 1310253007: Make pub lish validation gitignore-aware. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: analysis hints Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/validator/pubspec_test.dart
diff --git a/test/validator/pubspec_test.dart b/test/validator/pubspec_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7836da7cf1454a3a2ef804f73c15ac5e83aab92c
--- /dev/null
+++ b/test/validator/pubspec_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/pubspec.dart';
+import 'package:scheduled_test/scheduled_test.dart';
+
+import '../descriptor.dart' as d;
+import '../test_pub.dart';
+import 'utils.dart';
+
+main() {
+ integration('should consider a package valid if it has a pubspec', () {
+ d.validPackage.create();
+
+ expectNoValidationError((entrypoint) => new PubspecValidator(entrypoint));
+ });
+
+ integration('should consider a package invalid if it has a .gitignored '
+ 'pubspec', () {
+ var repo = d.git(appPath, [d.file(".gitignore", "pubspec.yaml")]);
+ d.validPackage.create();
+ repo.create();
+
+ expectValidationError((entrypoint) => new PubspecValidator(entrypoint));
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698