Sha256: 818c1ce3a97fccf9b21b20d3acd90849efe4f09a0d594949daa69e2a9f3d9c75

Contents?: true

Size: 431 Bytes

Versions: 4

Compression:

Stored size: 431 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 id of the '(.+)' document$/ do |collection, doc_name|
  self.finder_query = klass(collection).find_one(instance_variable_get("@#{doc_name}").id)
end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongodoc-0.2.4 features/step_definitions/finder_steps.rb
mongodoc-0.2.2 features/step_definitions/finder_steps.rb
mongodoc-0.2.1 features/step_definitions/finder_steps.rb
mongodoc-0.2.0 features/step_definitions/finder_steps.rb