Sha256: 5d20d359807d7dd3a865b03a6b60069349cd4d756482d1ddffd2067820c5f47e
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
require "support/object_graph_setup" require "support/seed_records" RSpec.shared_context "seed data setup" do include_context "object graph setup" before { seeded_records.each do |(namespace, record)| datastore[namespace].insert(record) end } let(:seeded_records) { [ [ :users, SeedRecords.hansel_record ], [ :users, SeedRecords.jasper_record ], [ :users, SeedRecords.poppy_record ], [ :posts, SeedRecords.biscuits_post_record ], [ :posts, SeedRecords.sleep_post_record ], [ :posts, SeedRecords.catch_frogs_post_record ], [ :posts, SeedRecords.chew_up_boxes_post_record ], [ :comments, SeedRecords.biscuits_post_comment_record ], [ :categories, SeedRecords.cat_biscuits_category_record ], [ :categories, SeedRecords.eating_and_sleeping_category_record ], [ :categories, SeedRecords.hunting_category_record ], [ :categories, SeedRecords.messing_stuff_up_category_record ], *SeedRecords.categories_to_posts_records.map { |record| [ :categories_to_posts, record ] }, ] } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
terrestrial-0.5.0 | spec/support/seed_data_setup.rb |