Sha256: f4dbc791b8997ab063a9c10370a17c71ab0fe6b444556c86eddb7622b5041efe

Contents?: true

Size: 787 Bytes

Versions: 1

Compression:

Stored size: 787 Bytes

Contents

module AeEasy
  module Core
    module Mock
      # Fake finisher that emulates `AnswersEngine` finisher executor.
      class FakeFinisher
        include AeEasy::Core::Mock::FakeExecutor

        # Fake finisher exposed methods to isolated context.
        # @private
        #
        # @return [Array]
        def self.exposed_methods
          real_methods = AnswersEngine::Scraper::RubyFinisherExecutor.exposed_methods.uniq
          mock_methods = [
            :outputs,
            :save_outputs,
            :find_output,
            :find_outputs
          ]
          AeEasy::Core::Mock::FakeExecutor.check_compatibility real_methods, mock_methods
          mock_methods << :job_id
          mock_methods.freeze
          mock_methods
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ae_easy-core-0.2.0 lib/ae_easy/core/mock/fake_finisher.rb