require 'spec_helper'

describe command('mongo testdb --quiet --host localhost --port 27017 --eval "db.getCollection(\'mycollection\').stats()"') do
  its(:stdout) { should match /"ns" : "testdb.mycollection"/ }
end

require 'spec_helper'

describe command('mongo testdb --quiet --host localhost --port 27017 --eval "printjson(db.getCollection(\'mycollection\').stats())"') do
  its(:stdout) { should match /"ns" : "testdb.mycollection"/ }
  its(:stdout) { should_not match /"sharded" :/ }
end

Make sure collection is created with sharding by default
Make sure collection is created with sharding by default
