Sha256: 8e7bcc55c9173a34bb86908c4ce9de4ef7a20e9e845657bc917408e52e35afdc

Contents?: true

Size: 835 Bytes

Versions: 13

Compression:

Stored size: 835 Bytes

Contents

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

        # Fake parser exposed methods to isolated context.
        # @private
        #
        # @return [Array]
        def self.exposed_methods
          real_methods = AnswersEngine::Scraper::RubyParserExecutor.exposed_methods.uniq
          mock_methods = [
            :content,
            :failed_content,
            :outputs,
            :pages,
            :page,
            :save_pages,
            :save_outputs,
            :find_output,
            :find_outputs
          ].freeze
          AeEasy::Core::Mock::FakeExecutor.check_compatibility real_methods, mock_methods
          mock_methods
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ae_easy-core-0.1.9 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.8 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.7 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.6 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.5 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.4 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.3 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.2 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.1 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.1.0 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.0.5 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.0.4 lib/ae_easy/core/mock/fake_parser.rb
ae_easy-core-0.0.3 lib/ae_easy/core/mock/fake_parser.rb