Sha256: 3d861d9eb7e23a9bfba62efd7b304ac3c226e2af975166eefcf3c659b606a4ec
Contents?: true
Size: 780 Bytes
Versions: 18
Compression:
Stored size: 780 Bytes
Contents
require 'spec_helper' RSpec.describe Ollama::Handlers::Progress do it 'has .to_proc' do expect_any_instance_of(described_class).to receive(:call).with(:foo) described_class.call(:foo) end it 'can display progress' do response = double('response', status: 'testing', completed: 23, total: 666, error: nil) expect(infobar.counter).to receive(:progress).with(by: 23).and_call_original expect(infobar.display).to receive(:update).and_call_original described_class.new.call(response) end it 'can display errors in progress' do response = double('response', error: 'foo', status: nil, completed: nil, total: nil) progress = described_class.new expect(infobar).to receive(:puts).with(/Error: .*foo/) progress.call(response) end end
Version data entries
18 entries across 18 versions & 1 rubygems