Configure rspec to run :xvfb examples with Xvfb
This commit is contained in:
parent
6ce8edda99
commit
34d84ad111
@ -1,3 +1,5 @@
|
|||||||
|
require 'headless'
|
||||||
|
|
||||||
require 'uh/wm'
|
require 'uh/wm'
|
||||||
|
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
@ -15,4 +17,10 @@ RSpec.configure do |config|
|
|||||||
# Ensure current X display is not available from rspec test suite.
|
# Ensure current X display is not available from rspec test suite.
|
||||||
ENV.delete 'DISPLAY'
|
ENV.delete 'DISPLAY'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
config.around :example, :xvfb do |example|
|
||||||
|
Headless.ly do
|
||||||
|
example.run
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user