Sha256: 027ad28fbcf414fe2f9dd05932dc37f886b56930054701bc0f1a7729ad8981cf

Contents?: true

Size: 591 Bytes

Versions: 2

Compression:

Stored size: 591 Bytes

Contents

module DCA
  module Mock
    class AnalyzerJob < DCA::Jobs::AnalyzerJob

      def positions(&block)
        positions = YAML.load_file(options[:fixture])
        positions.each { |position| block.call Position.new position.symbolize_keys }
      end

      def fetch(position)
        raise Exception if position.raise
        position.failed ? nil : position
      end
    end
  end

  module Areas
    module Mock
      class AnalyzerJob < DCA::Jobs::AnalyzerJob
        def perform
          loop do
            break if shutdown?
          end
        end
      end
    end
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dca-0.1.1 spec/mock/analyzer_job.rb
dca-0.1.0 spec/mock/analyzer_job.rb