Sha256: 8ead27caf55d2ad52610de7c1aaa306de9fc90ce9a1464476f3132f9c3d5f024

Contents?: true

Size: 801 Bytes

Versions: 6

Compression:

Stored size: 801 Bytes

Contents

module Dynflow
  module Testing
    class DummyWorld
      extend Mimic
      mimic! World

      attr_reader :clock, :executor, :middleware
      attr_accessor :action

      def initialize
        @logger_adapter = Testing.logger_adapter
        @clock          = ManagedClock.new
        @executor       = DummyExecutor.new(self)
        @middleware     = Middleware::World.new
      end

      def action_logger
        @logger_adapter.action_logger
      end

      def logger
        @logger_adapter.dynflow_logger
      end

      def subscribed_actions(klass)
        []
      end

      def event(execution_plan_id, step_id, event, future = Future.new)
        executor.event execution_plan_id, step_id, event, future
      end

      def persistence
        nil
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dynflow-0.6.1 lib/dynflow/testing/dummy_world.rb
dynflow-0.6.0 lib/dynflow/testing/dummy_world.rb
dynflow-0.5.1 lib/dynflow/testing/dummy_world.rb
dynflow-0.5.0 lib/dynflow/testing/dummy_world.rb
dynflow-0.4.1 lib/dynflow/testing/dummy_world.rb
dynflow-0.4.0 lib/dynflow/testing/dummy_world.rb