Sha256: d3fcc90055710a8d41ba5dfc55ee6b7b4017c5aa6c3cc65b3874f37446b82f28
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
require_relative '../../test_helper' module Vedeu describe Application do let(:described_class) { Application } let(:described_instance) { described_class.new(options) } let(:options) { {} } it 'returns an Application instance' do described_instance.must_be_instance_of(Application) end describe '.start' do let(:subject) { described_class.start(options) } before do Terminal.stubs(:open).yields(self) Output.stubs(:render) Input.stubs(:capture) Process.stubs(:evaluate) Terminal.stubs(:close) end context 'when the application should run interactively' do let(:options) { { interactive: true } } before { Process.stubs(:evaluate).raises(StopIteration) } it 'returns a NilClass' do subject.must_be_instance_of(NilClass) end end context 'when the application should run once' do let(:options) { { interactive: false } } it 'returns a NilClass' do subject.must_be_instance_of(NilClass) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.0.25 | test/lib/vedeu/application_test.rb |