Configure rspec to run :xvfb examples with Xvfb

This commit is contained in:
Thibault Jouan 2015-04-13 00:22:00 +00:00
parent 6ce8edda99
commit 34d84ad111

View File

@ -1,3 +1,5 @@
require 'headless'
require 'uh/wm'
RSpec.configure do |config|
@ -15,4 +17,10 @@ RSpec.configure do |config|
# Ensure current X display is not available from rspec test suite.
ENV.delete 'DISPLAY'
end
config.around :example, :xvfb do |example|
Headless.ly do
example.run
end
end
end