Sha256: 12e8b008c90cc190f8388aa9de74f68847548c39cef49d83a79618a33953cdd2

Contents?: true

Size: 976 Bytes

Versions: 3

Compression:

Stored size: 976 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'bedrock_runtime/payload_builders/base'

RSpec.describe RubyAmazonBedrock::PayloadBuilders::Base do
  describe '#initialize' do
    it 'creates a new instance with input and options' do
      input = 'example_input'
      options = { key: 'value' }

      payload_builder = described_class.new(input, options)

      expect(payload_builder.instance_variable_get(:@input)).to eq(input)
      expect(payload_builder.instance_variable_get(:@options)).to eq(options)
    end
  end

  describe '#build' do
    it 'raises NotImplementedError' do
      payload_builder = described_class.new('example_input')

      expect { payload_builder.build }.to raise_error(NotImplementedError)
    end
  end

  describe '#model_id' do
    it 'raises NotImplementedError' do
      payload_builder = described_class.new('example_input')

      expect { payload_builder.model_id }.to raise_error(NotImplementedError)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-amazon-bedrock-0.2.1 spec/bedrock_runtime/payload_builders/base_spec.rb
ruby-amazon-bedrock-0.2.0 spec/bedrock_runtime/payload_builders/base_spec.rb
ruby-amazon-bedrock-0.1.1 spec/bedrock_runtime/payload_builders/base_spec.rb