Allow layout options configuration from run control

This commit is contained in:
Thibault Jouan
2015-04-26 02:49:39 +00:00
parent 70fe9bdb03
commit 7c2712924a
3 changed files with 34 additions and 9 deletions

View File

@@ -87,10 +87,19 @@ module Uh
describe '#layout' do
context 'when given a class' do
let(:layout_class) { Class.new }
it 'sets a layout class in the env' do
rc.layout layout_class = Class.new
rc.layout layout_class
expect(env.layout_class).to be layout_class
end
context 'when given options' do
it 'instantiates the class with given options' do
expect(layout_class).to receive(:new).with(foo: :bar)
rc.layout layout_class, foo: :bar
end
end
end
context 'when given an object' do