Sha256: a2dcebbca3f5c014f28466dc03201abc1b35ff1811684169b75972c9cbfb2544
Contents?: true
Size: 1005 Bytes
Versions: 1
Compression:
Stored size: 1005 Bytes
Contents
require "mongo-fixture" describe Mongo::Fixture do context "two collections are to be inserted with references" do before do Fast.file.write "test/fixtures/references/users.yaml", "pepe: username: pepe password: raw: secreto processed: 252db48960f032db4bb604bc26f97106fa85ff88dedef3a28671b6bcd9f9644bf90d7e444d587c9351dfa237a6fc8fe38641a8469d084a166c7807d9c6564860 name: Pepe" Fast.file.write "test/fixtures/references/sessions.yaml", "14_horas: user: users: pepe time: 2012-07-30T14:02:40-03:00 y_tres_minutos: user: users: pepe time: 2012-07-30T14:03:40-03:00 y_cuatro_minutos: user: users: pepe time: 2012-07-30T14:04:40-03:00" end it "should not fail!" do collection = double 'coll', :count => 0, :insert => nil database = double 'database' database.stub :[] do |argument| collection end Mongo::Fixture.new :references, database end after do Fast.dir.remove! :test end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongo-fixture-0.0.4 | spec/mongo/cross_references_spec.rb |