Browse Source

Run seeds on development

feature/geojson
Bèr Kessels 1 month ago
parent
commit
cef902d7e9
2 changed files with 16 additions and 0 deletions
  1. 1
    0
      Makefile
  2. 15
    0
      Rakefile

+ 1
- 0
Makefile View File

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

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

Loading…
Cancel
Save