OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library pub_tests; | 5 library pub_tests; |
6 | 6 |
7 import '../descriptor.dart' as d; | 7 import '../descriptor.dart' as d; |
8 import '../test_pub.dart'; | 8 import '../test_pub.dart'; |
9 | 9 |
10 main() { | 10 main() { |
11 initConfig(); | |
12 | |
13 forBothPubGetAndUpgrade((command) { | 11 forBothPubGetAndUpgrade((command) { |
14 integration("removes a dependency that's removed from the pubspec", () { | 12 integration("removes a dependency that's removed from the pubspec", () { |
15 servePackages((builder) { | 13 servePackages((builder) { |
16 builder.serve("foo", "1.0.0"); | 14 builder.serve("foo", "1.0.0"); |
17 builder.serve("bar", "1.0.0"); | 15 builder.serve("bar", "1.0.0"); |
18 }); | 16 }); |
19 | 17 |
20 d.appDir({"foo": "any", "bar": "any"}).create(); | 18 d.appDir({"foo": "any", "bar": "any"}).create(); |
21 | 19 |
22 pubCommand(command); | 20 pubCommand(command); |
23 | 21 |
24 d.packagesDir({ | 22 d.packagesDir({ |
25 "foo": "1.0.0", | 23 "foo": "1.0.0", |
26 "bar": "1.0.0" | 24 "bar": "1.0.0" |
27 }).validate(); | 25 }).validate(); |
28 | 26 |
29 d.appDir({"foo": "any"}).create(); | 27 d.appDir({"foo": "any"}).create(); |
30 | 28 |
31 pubCommand(command); | 29 pubCommand(command); |
32 | 30 |
33 d.packagesDir({ | 31 d.packagesDir({ |
34 "foo": "1.0.0", | 32 "foo": "1.0.0", |
35 "bar": null | 33 "bar": null |
36 }).validate(); | 34 }).validate(); |
37 }); | 35 }); |
38 }); | 36 }); |
39 } | 37 } |
OLD | NEW |