Sha256: 824580bd8d2e7117ce4398e526c3369cf6a3f0e8f80eb822f1a9279515977514

Contents?: true

Size: 588 Bytes

Versions: 4

Compression:

Stored size: 588 Bytes

Contents

Then /^the field (\w+) of the document '(\w+)' is not nil$/ do |field, name|
  doc = instance_variable_get("@#{name}")
  doc.send(field).should_not be_nil
end

When /^'(\w+)' references '(\w+)' as '(\w+)'$/ do |parent, child, field|
  parent_doc = instance_variable_get("@#{parent}")
  child_doc = instance_variable_get("@#{child}")
  parent_doc.send("#{field}=", child_doc)
end

Then /^'(\w+)' refers to '(\w+)' as '(\w+)'$/ do |name, other, field|
  doc = instance_variable_get("@#{name}")
  other_doc = instance_variable_get("@#{other}")
  doc.send("#{field}").should == other_doc
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongo_doc-0.6.9 features/step_definitions/field_steps.rb
mongo_doc-0.6.8 features/step_definitions/field_steps.rb
mongo_doc-0.6.7 features/step_definitions/field_steps.rb
mongo_doc-0.6.6 features/step_definitions/field_steps.rb