Bläddra i källkod

Run seeds on development

tags/0.3.0^2
Bèr Kessels 11 månader sedan
förälder
incheckning
cef902d7e9
2 ändrade filer med 16 tillägg och 0 borttagningar
  1. 1
    0
      Makefile
  2. 15
    0
      Rakefile

+ 1
- 0
Makefile Visa fil

@@ -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 Visa fil

@@ -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

Laddar…
Avbryt
Spara