Sha256: 64fead596c76fa3991a65dd2f9e4d0d652994235d5b51dd233fe252e14c13e6b

Contents?: true

Size: 450 Bytes

Versions: 14

Compression:

Stored size: 450 Bytes

Contents

def finder_query=(finder)
  @query = finder
end

When /^I query (.+) with (\w+)$/ do |doc, finder|
  self.finder_query = klass(doc).send(finder)
end

When /^I query (.+) to find_one with the (.+) of the '(.+)' document$/ do |collection, id, doc_name|
  self.finder_query = klass(collection).find_one(instance_variable_get("@#{doc_name}").send(id))
end

Then /^the query result (?:is|was) (\d+) documents$/ do |count|
  query.should == count.to_i
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mongo_doc-0.6.26 features/step_definitions/finder_steps.rb
mongo_doc-0.6.25 features/step_definitions/finder_steps.rb
mongo_doc-0.6.23 features/step_definitions/finder_steps.rb
mongo_doc-0.6.22 features/step_definitions/finder_steps.rb
mongo_doc-0.6.21 features/step_definitions/finder_steps.rb
mongo_doc-0.6.20 features/step_definitions/finder_steps.rb
mongo_doc-0.6.19 features/step_definitions/finder_steps.rb
mongo_doc-0.6.18 features/step_definitions/finder_steps.rb
mongo_doc-0.6.17 features/step_definitions/finder_steps.rb
mongo_doc-0.6.16 features/step_definitions/finder_steps.rb
mongo_doc-0.6.15 features/step_definitions/finder_steps.rb
mongo_doc-0.6.14 features/step_definitions/finder_steps.rb
mongo_doc-0.6.13 features/step_definitions/finder_steps.rb
mongo_doc-0.6.12 features/step_definitions/finder_steps.rb