Integrate our new Runner into CLI

This commit is contained in:
Thibault Jouan 2015-04-08 17:36:11 +00:00
parent ea0034fd7e
commit 49fe77ddb1
2 changed files with 3 additions and 14 deletions

View File

@ -32,9 +32,7 @@ module Uh
end
def run
@display = Display.new
@display.open
@env.log "Connected to X server on `#{@display}'"
Runner.run env
end

View File

@ -63,19 +63,10 @@ module Uh
end
describe '#run' do
let(:display) { instance_spy Display }
before { allow(Display).to receive(:new) { display } }
it 'opens a new X display' do
expect(display).to receive :open
it 'runs a runner with the env' do
expect(Runner).to receive(:run).with(cli.env)
cli.run
end
it 'prints a message on standard output when connected' do
cli.run
expect(stdout.string).to match /connected/i
end
end
describe '#parse_arguments!' do