Merge pull request #3 from dart-lang/devoncarew_coverage

add more tests
diff --git a/test/pub_cache_test.dart b/test/pub_cache_test.dart
index d5a554c..147ca06 100644
--- a/test/pub_cache_test.dart
+++ b/test/pub_cache_test.dart
@@ -31,5 +31,82 @@
       PubCache cache = new PubCache();
       expect(cache.getBinaries(), isNotNull);
     });
+
+    test('getGlobalApplications', () {
+      PubCache cache = new PubCache();
+      expect(cache.getGlobalApplications(), isNotEmpty);
+    });
+
+    test('getPackageRefs', () {
+      PubCache cache = new PubCache();
+      expect(cache.getPackageRefs(), isNotEmpty);
+    });
+  });
+
+  group('Application', () {
+    PubCache cache;
+    Application app;
+
+    setUp(() {
+      cache = new PubCache();
+      app = cache.getGlobalApplications().first;
+    });
+
+    test('name', () {
+      expect(app.name, isNotEmpty);
+    });
+
+    test('version', () {
+      expect(app.version, isNotNull);
+    });
+
+    test('getPackageRefs', () {
+      expect(app.getPackageRefs(), isNotEmpty);
+    });
+
+    test('toString', () {
+      expect(app.toString(), isNotEmpty);
+    });
+  });
+
+  group('PackageRef', () {
+    PubCache cache;
+    Application app;
+    PackageRef ref;
+
+    setUp(() {
+      cache = new PubCache();
+      app = cache.getGlobalApplications().first;
+      ref = app.getPackageRefs().first;
+    });
+
+    test('name', () {
+      expect(ref.name, isNotEmpty);
+    });
+
+    test('==', () {
+      PackageRef ref0 = app.getPackageRefs()[0];
+      PackageRef ref1 = app.getPackageRefs()[1];
+
+      expect(ref0, equals(ref0));
+      expect(ref0, isNot(equals(ref1)));
+    });
+
+    test('resolve', () {
+      expect(ref.resolve(), isNotNull);
+    });
+
+    test('toString', () {
+      expect(ref.toString(), isNotEmpty);
+    });
+  });
+
+  group('Package', () {
+    test('toString', () {
+      PubCache cache = new PubCache();
+      Package p = cache.getPackageRefs().first.resolve();
+      expect(p, isNotNull);
+      expect(p.toString(), isNotEmpty);
+    });
   });
 }
diff --git a/tool/travis.sh b/tool/travis.sh
index 003f83c..4219f19 100755
--- a/tool/travis.sh
+++ b/tool/travis.sh
@@ -7,6 +7,8 @@
 # Fast fail the script on failures.
 set -e
 
+pub global activate dart_coveralls
+
 # Verify that the libraries are error free.
 dartanalyzer --fatal-warnings \
   example/list.dart \
@@ -18,7 +20,6 @@
 
 # Install dart_coveralls; gather and send coverage data.
 if [ "$COVERALLS_TOKEN" ]; then
-  pub global activate dart_coveralls
   pub global run dart_coveralls report \
     --token $COVERALLS_TOKEN \
     --retry 2 \