Sha256: ececb23c14866309b4a6ffb972c6553abcaf0c0930a574ead7832add3d54c15c
Contents?: true
Size: 755 Bytes
Versions: 2
Compression:
Stored size: 755 Bytes
Contents
shared_examples_for :it_can_have_ui_components do |subject_class| describe '.ui_component' do it 'adds an accessor method for the named component that defaults to an instance of the specified class' do configuration = double('Kookaburra::Configuration').as_null_object foo_component_class = double(Class) allow(foo_component_class).to receive(:new) \ .with(configuration, :option => :value) \ .and_return(:a_foo_component) component_container_class = Class.new(subject_class) do ui_component :foo, foo_component_class, :option => :value end component_container = component_container_class.new(configuration) expect(component_container.foo).to eq :a_foo_component end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kookaburra-3.0.1 | spec/support/shared_examples/it_can_have_ui_components.rb |
kookaburra-3.0.0 | spec/support/shared_examples/it_can_have_ui_components.rb |