Sha256: 021de716bf0c67438a36c45376f68b2a81013574bb1e3379c71110cadabeec88

Contents?: true

Size: 595 Bytes

Versions: 33

Compression:

Stored size: 595 Bytes

Contents

Given /a new collection named '(.*)'/ do |name|
  MongoDoc::Connection.database.drop_collection(name)
  @collection = MongoDoc::Collection.new(name)
end

Given /^an empty (\w+) collection$/ do |name|
  MongoDoc::Connection.database.drop_collection(name)
  MongoDoc::Connection.database.create_collection(name, :strict => true)
end

Then /the collection should have (\d+) documents?/ do |count|
  @collection.count.should == count.to_i
end

When "I query the collection '$collection_name' with the criteria $criteria" do |collection_name, criteria|
  @query = eval("@collection.#{criteria}")
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
mongo_doc-0.6.26 features/step_definitions/collection_steps.rb
mongo_doc-0.6.25 features/step_definitions/collection_steps.rb
mongo_doc-0.6.23 features/step_definitions/collection_steps.rb
mongo_doc-0.6.22 features/step_definitions/collection_steps.rb
mongo_doc-0.6.21 features/step_definitions/collection_steps.rb
mongo_doc-0.6.20 features/step_definitions/collection_steps.rb
mongo_doc-0.6.19 features/step_definitions/collection_steps.rb
mongo_doc-0.6.18 features/step_definitions/collection_steps.rb
mongo_doc-0.6.17 features/step_definitions/collection_steps.rb
mongo_doc-0.6.16 features/step_definitions/collection_steps.rb
mongo_doc-0.6.15 features/step_definitions/collection_steps.rb
mongo_doc-0.6.14 features/step_definitions/collection_steps.rb
mongo_doc-0.6.13 features/step_definitions/collection_steps.rb
mongo_doc-0.6.12 features/step_definitions/collection_steps.rb
mongo_doc-0.6.11 features/step_definitions/collection_steps.rb
mongo_doc-0.6.10 features/step_definitions/collection_steps.rb
mongo_doc-0.6.9 features/step_definitions/collection_steps.rb
mongo_doc-0.6.8 features/step_definitions/collection_steps.rb
mongo_doc-0.6.7 features/step_definitions/collection_steps.rb
mongo_doc-0.6.6 features/step_definitions/collection_steps.rb