function(cb) {
      var calli = Dog.new({ name: 'Calli' });
      // saves and creates connection
      scott.addDog(calli, function(err) {
        if (err) { return cb(err); }

        scott.fetchDogs(function(err) {
          if (err) { return cb(err); }

          assert(scott.dogs);
          var dog = scott.dogs[0];
          assert(dog.uuid);
          assert(dog.name === 'Calli');
          cb();
        });
      });
    }
function(cb) {
      var calli = Dog.new({ name: 'Calli' });
      
      scott.addDog(calli, function(err) {
        if (err) { return cb(err); }

        scott.fetchDogs(function(err) {
          if (err) { return cb(err); }

          assert(scott.dogs);
          var dog = scott.dogs[0];
          assert(dog.uuid);
          assert(dog.name === 'Calli');
          cb();
        });
      });
    }
function ( cb ) { var calli = Dog . new ( { name : 'Calli' } ) ; // saves and creates connection scott . addDog ( calli , function ( err ) { if ( err ) { return cb ( err ) ; } scott . fetchDogs ( function ( err ) { if ( err ) { return cb ( err ) ; } assert ( scott . dogs ) ; var dog = scott . dogs [ 0 ] ; assert ( dog . uuid ) ; assert ( dog . name === 'Calli' ) ; cb ( ) ; } ) ; } ) ; }
add a dog
add a dog