OLD | NEW |
1 import 'package:scheduled_test/scheduled_test.dart'; | 1 import 'package:scheduled_test/scheduled_test.dart'; |
2 import '../../descriptor.dart' as d; | 2 import '../../descriptor.dart' as d; |
3 import '../../test_pub.dart'; | 3 import '../../test_pub.dart'; |
| 4 import 'utils.dart'; |
4 main() { | 5 main() { |
5 initConfig(); | 6 initConfig(); |
6 integration("removes previous binstubs when reactivating a package", () { | 7 integration("removes previous binstubs when reactivating a package", () { |
7 d.dir("foo", [d.pubspec({ | 8 d.dir("foo", [d.pubspec({ |
8 "name": "foo", | 9 "name": "foo", |
9 "executables": { | 10 "executables": { |
10 "one": null, | 11 "one": null, |
11 "two": null | 12 "two": null |
12 } | 13 } |
13 }), | 14 }), |
14 d.dir( | 15 d.dir( |
15 "bin", | 16 "bin", |
16 [ | 17 [ |
17 d.file("one.dart", "main() => print('ok');"), | 18 d.file("one.dart", "main() => print('ok');"), |
18 d.file("two.dart", "main() => print('ok');")])]).create(); | 19 d.file("two.dart", "main() => print('ok');")])]).create(); |
19 schedulePub(args: ["global", "activate", "--source", "path", "../foo"]); | 20 schedulePub(args: ["global", "activate", "--source", "path", "../foo"]); |
20 d.dir("foo", [d.pubspec({ | 21 d.dir("foo", [d.pubspec({ |
21 "name": "foo", | 22 "name": "foo", |
22 "executables": { | 23 "executables": { |
23 "two": null | 24 "two": null |
24 } | 25 } |
25 })]).create(); | 26 })]).create(); |
26 schedulePub(args: ["global", "activate", "--source", "path", "../foo"]); | 27 schedulePub(args: ["global", "activate", "--source", "path", "../foo"]); |
27 d.dir( | 28 d.dir( |
28 cachePath, | 29 cachePath, |
29 [ | 30 [ |
30 d.dir( | 31 d.dir( |
31 "bin", | 32 "bin", |
32 [d.nothing("one"), d.matcherFile("two", contains("two"))])]).val
idate(); | 33 [ |
| 34 d.nothing(binStubName("one")), |
| 35 d.matcherFile(binStubName("two"), contains("two"))])]).valid
ate(); |
33 }); | 36 }); |
34 } | 37 } |
OLD | NEW |