Integrate our new Runner into CLI
This commit is contained in:
parent
ea0034fd7e
commit
49fe77ddb1
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user