Sha256: 2e6aba192e599410da88f491e40a3a792f9983b35dd1b093d3eca79b3dcaa2dc

Contents?: true

Size: 443 Bytes

Versions: 21

Compression:

Stored size: 443 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 was (\d+) documents$/ do |count|
  query.should == count.to_i
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
mongo_doc-0.6.11 features/step_definitions/finder_steps.rb
mongo_doc-0.6.10 features/step_definitions/finder_steps.rb
mongo_doc-0.6.9 features/step_definitions/finder_steps.rb
mongo_doc-0.6.8 features/step_definitions/finder_steps.rb
mongo_doc-0.6.7 features/step_definitions/finder_steps.rb
mongo_doc-0.6.6 features/step_definitions/finder_steps.rb
mongo_doc-0.6.5 features/step_definitions/finder_steps.rb
mongo_doc-0.6.4 features/step_definitions/finder_steps.rb
mongo_doc_rails2-0.6.2 features/step_definitions/finder_steps.rb
mongo_doc-0.6.3 features/step_definitions/finder_steps.rb
mongo_doc-0.6.2 features/step_definitions/finder_steps.rb
mongo_doc-0.6.1 features/step_definitions/finder_steps.rb
mongo_doc-0.6.0 features/step_definitions/finder_steps.rb
mongo_doc_rails2-0.6.1 features/step_definitions/finder_steps.rb
mongo_doc-0.5.5 features/step_definitions/finder_steps.rb
mongo_doc-0.4.2 features/step_definitions/finder_steps.rb
mongo_doc-0.4.1 features/step_definitions/finder_steps.rb
mongo_doc-0.4.0 features/step_definitions/finder_steps.rb
mongo_doc-0.3.2 features/step_definitions/finder_steps.rb
mongo_doc-0.3.1 features/step_definitions/finder_steps.rb