Sha256: c625626d3b4c99c0b69a0bc9fe1b83950588d988c7ec9ccc61896db4d4734a6b
Contents?: true
Size: 900 Bytes
Versions: 16
Compression:
Stored size: 900 Bytes
Contents
require 'ostruct' require 'spec_helper' class App < OpenStruct end class Service < OpenStruct end describe Aptible::CLI::Agent do before { subject.stub(:ask) } before { subject.stub(:save_token) } before { subject.stub(:fetch_token) { double 'token' } } let(:service) { Service.new(process_type: 'web') } let(:app) do App.new(handle: 'foobar', status: 'provisioned', services: [service]) end describe '#logs' do it 'should fail if the app is unprovisioned' do allow(app).to receive(:status) { 'pending' } allow(subject).to receive(:ensure_app) { app } expect { subject.send('logs') }.to raise_error(Thor::Error) end it 'should fail if the app has no services' do allow(app).to receive(:services) { [] } allow(subject).to receive(:ensure_app) { app } expect { subject.send('logs') }.to raise_error(Thor::Error) end end end
Version data entries
16 entries across 16 versions & 1 rubygems