Extract user acceptance test helpers in a module

This commit is contained in:
Thibault Jouan
2015-04-13 01:56:08 +00:00
parent 10591d0646
commit 53d83d5f08
10 changed files with 84 additions and 59 deletions

View File

@@ -1,6 +1,8 @@
require 'aruba/cucumber'
require 'headless'
require 'uh/wm/testing/acceptance_helpers'
module Aruba
class SpawnProcess
def pid
@@ -9,15 +11,14 @@ module Aruba
end
end
World(Uh::WM::Testing::AcceptanceHelpers)
Headless.new.start
After do |scenario|
@process and @process.terminate
uhwm_ensure_stop
end
Around '@other_wm_running' do |scenario, block|
@other_wm = ChildProcess.build('twm')
@other_wm.start
block.call
@other_wm.stop
with_other_wm { block.call }
end