Refactor specs with factory helper methods

This commit is contained in:
Thibault Jouan
2015-04-21 12:35:45 +00:00
parent 2cad5da620
commit 47bc9c9da2
5 changed files with 44 additions and 25 deletions

View File

@@ -1,11 +1,8 @@
module Uh
module WM
RSpec.describe Client do
let(:geo) { Geo.new(0, 0, 640, 480) }
let(:window) do
instance_spy Window, 'window', to_s: 'wid',
name: 'wname', wclass: 'wclass'
end
let(:window) { mock_window }
let(:geo) { build_geo }
subject(:client) { described_class.new window, geo }
it 'is not visible' do