Implement basic Manager
This commit is contained in:
parent
bc2ab4b9fa
commit
cd76c4e270
@ -2,6 +2,7 @@ require 'uh'
|
||||
|
||||
require 'uh/wm/cli'
|
||||
require 'uh/wm/env'
|
||||
require 'uh/wm/manager'
|
||||
|
||||
module Uh
|
||||
module WM
|
||||
|
15
lib/uh/wm/manager.rb
Normal file
15
lib/uh/wm/manager.rb
Normal file
@ -0,0 +1,15 @@
|
||||
module Uh
|
||||
module WM
|
||||
class Manager
|
||||
attr_reader :display
|
||||
|
||||
def initialize
|
||||
@display = Display.new
|
||||
end
|
||||
|
||||
def connect
|
||||
@display.open
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
20
spec/uh/wm/manager_spec.rb
Normal file
20
spec/uh/wm/manager_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
module Uh
|
||||
module WM
|
||||
RSpec.describe Manager do
|
||||
subject(:manager) { described_class.new }
|
||||
|
||||
describe '#initialize' do
|
||||
it 'assigns a new display' do
|
||||
expect(manager.display).to be_a Display
|
||||
end
|
||||
end
|
||||
|
||||
describe '#connect' do
|
||||
it 'opens the display' do
|
||||
expect(manager.display).to receive :open
|
||||
manager.connect
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user