Integrate our new Runner into CLI
This commit is contained in:
parent
ea0034fd7e
commit
49fe77ddb1
@ -32,9 +32,7 @@ module Uh
|
|||||||
end
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
@display = Display.new
|
Runner.run env
|
||||||
@display.open
|
|
||||||
@env.log "Connected to X server on `#{@display}'"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,19 +63,10 @@ module Uh
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe '#run' do
|
describe '#run' do
|
||||||
let(:display) { instance_spy Display }
|
it 'runs a runner with the env' do
|
||||||
|
expect(Runner).to receive(:run).with(cli.env)
|
||||||
before { allow(Display).to receive(:new) { display } }
|
|
||||||
|
|
||||||
it 'opens a new X display' do
|
|
||||||
expect(display).to receive :open
|
|
||||||
cli.run
|
cli.run
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'prints a message on standard output when connected' do
|
|
||||||
cli.run
|
|
||||||
expect(stdout.string).to match /connected/i
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#parse_arguments!' do
|
describe '#parse_arguments!' do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user