You can either fire up “mongo” (the command-line client) and use that to connect to the running server to drop the collections, or do it from code inside the Meteor app. Is the app running local to your box? Is this something you have to do over and over again, or a one-off?
Ted Neward
Leading, Speaking, Consulting, Writing
The app is running local and this would happen on a one-to-one ratio with the acceptance tests, of which there will be hundreds.
If I connect to the db and drop all tables from my test runner (which is a separate process), will this cause meteor to fire events?
That, I couldn’t say—I’m newer to Meteor than you. I doubt it, though, since I *think* MongoDB doesn’t have any kind of database-originating push notification that Meteor could hook into. (At least, I’ve never seen one, but it’s been a while since I cruised through the Mongo docs.) Going through the Mongo shell completely bypasses the Meteor infrastructure.
Meteor folks, correct me where I’m wrong.
If I connect to the db and drop all tables from my test runner (which is a separate process), will this cause meteor to fire events?
Can collection.remove({}) be called from the client? I'm using selenium which can inject scripts into the client, so I could do this if it's client side.
Can collection.remove({}) be called from the client? I'm using selenium which can inject scripts into the client, so I could do this if it's client side.Don't know off hand if remove is included in the "client can only modify one document at a time" rule or not, but if not, just make a Meteor method for the client to call.