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