Register a Layout with display information
This commit is contained in:
parent
b9b2bff853
commit
de3fca228e
13
features/layout/registration.feature
Normal file
13
features/layout/registration.feature
Normal file
@ -0,0 +1,13 @@
|
||||
Feature: layout registration
|
||||
|
||||
Scenario: sends the #register message to the layout with the display
|
||||
Given a file named layout.rb with:
|
||||
"""
|
||||
class Layout
|
||||
def register display
|
||||
puts display
|
||||
end
|
||||
end
|
||||
"""
|
||||
When I run uhwm with option -r./layout -l Layout
|
||||
Then the current output must contain current display
|
3
features/steps/filesystem_steps.rb
Normal file
3
features/steps/filesystem_steps.rb
Normal file
@ -0,0 +1,3 @@
|
||||
Given /^a file named ([^ ]+) with:$/ do |path, content|
|
||||
write_file path, content
|
||||
end
|
@ -31,3 +31,11 @@ end
|
||||
Then /^the current output must match \/([^\/]+)\/([a-z]*)$/ do |pattern, options|
|
||||
uhwm_wait_output Regexp.new(pattern, options)
|
||||
end
|
||||
|
||||
Then /^the current output must contain:$/ do |content|
|
||||
uhwm_wait_output content.to_s
|
||||
end
|
||||
|
||||
Then /^the current output must contain current display$/ do
|
||||
uhwm_wait_output ENV['DISPLAY']
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user