Sha256: 4261f784c09ed412c374212697f6087fb93d8e5ad49d5a39e17eb06a30620f1c
Contents?: true
Size: 961 Bytes
Versions: 16
Compression:
Stored size: 961 Bytes
Contents
require 'spec_helper' RSpec.describe Ollama::Commands::Copy do it 'can be instantiated' do copy = described_class.new(source: 'llama3.1', destination: 'camell3') expect(copy).to be_a described_class end it 'can be converted to JSON' do copy = described_class.new(source: 'llama3.1', destination: 'camell3') expect(copy.as_json).to include( source: 'llama3.1', destination: 'camell3', stream: false ) expect(copy.to_json).to eq( '{"source":"llama3.1","destination":"camell3","stream":false}' ) end it 'can perform' do copy = described_class.new(source: 'llama3.1', destination: 'camell3') copy.client = ollama = double('Ollama::Client') expect(ollama).to receive(:request).with( method: :post, path: '/api/copy', handler: Ollama::Handlers::NOP, stream: false, body: '{"source":"llama3.1","destination":"camell3","stream":false}' ) copy.perform(Ollama::Handlers::NOP) end end
Version data entries
16 entries across 16 versions & 1 rubygems