Connect to X server
This commit is contained in:
4
features/steps/run_steps.rb
Normal file
4
features/steps/run_steps.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
When /^I start uhwm$/ do
|
||||
@process = run 'uhwm'
|
||||
@interactive = @process
|
||||
end
|
10
features/steps/x_steps.rb
Normal file
10
features/steps/x_steps.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
Then /^it must connect to X display$/ do
|
||||
Timeout.timeout(exit_timeout) do
|
||||
loop do
|
||||
break if assert_partial_output_interactive 'Connected to'
|
||||
sleep 0.1
|
||||
end
|
||||
end
|
||||
expect(`sockstat -u`.lines.grep /\s+ruby.+\s+#{@process.pid}/)
|
||||
.not_to be_empty
|
||||
end
|
@@ -1,4 +1,12 @@
|
||||
require 'aruba/cucumber'
|
||||
require 'headless'
|
||||
|
||||
module Aruba
|
||||
class SpawnProcess
|
||||
def pid
|
||||
@process.pid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Headless.new.start
|
||||
|
5
features/x/connection.feature
Normal file
5
features/x/connection.feature
Normal file
@@ -0,0 +1,5 @@
|
||||
Feature: connection to X server
|
||||
|
||||
Scenario: connects to X server
|
||||
When I start uhwm
|
||||
Then it must connect to X display
|
Reference in New Issue
Block a user