浏览代码

Run seeds on development

tags/0.3.0^2
Bèr Kessels 11 个月前
父节点
当前提交
cef902d7e9
共有 2 个文件被更改,包括 16 次插入0 次删除
  1. 1
    0
      Makefile
  2. 15
    0
      Rakefile

+ 1
- 0
Makefile 查看文件

@@ -32,6 +32,7 @@ db-setup:
$(CMD_PREFIX) rake db:create
$(CMD_PREFIX) rake db:event_store
$(CMD_PREFIX) rake db:projections
$(CMD_PREFIX) rake db:seed # TODO: don't run seeds on test

##
# Set up the project for building

+ 15
- 0
Rakefile 查看文件

@@ -66,3 +66,18 @@ namespace :db do
Hours::Projections::Nodes::Projector.new.setup
end
end

namespace :db do
task seed: %i[environment event_sourcery] do
require_relative 'test/support/data_helpers.rb'
Dir['./test/support/workflows/*.rb'].each { |file| require file }

include DataHelpers
include Workflows::AddNode

events.each do |event|
puts event
projector.process(event)
end
end
end

正在加载...
取消
保存