We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d047e99 commit e104992Copy full SHA for e104992
spec/mongo/client_spec.rb
@@ -742,4 +742,28 @@
742
expect(client.dup.options).to be_a(Mongo::Options::Redacted)
743
end
744
745
+
746
+ describe '#collections' do
747
748
+ let(:client) do
749
+ described_class.new(['127.0.0.1:27017'], :database => TEST_DB)
750
+ end
751
752
+ before do
753
+ client.database[:users].create
754
755
756
+ after do
757
+ client.database[:users].drop
758
759
760
+ let(:collection) do
761
+ Mongo::Collection.new(client.database, 'users')
762
763
764
+ it 'refers the current database collections' do
765
+ expect(client.collections).to include(collection)
766
+ expect(client.collections).to all(be_a(Mongo::Collection))
767
768
769
0 commit comments