Sha256: 0a2dfcf55dada86fee1843e43a4e452baac1a79b3a4666bc3e48c2a36393da57
Contents?: true
Size: 744 Bytes
Versions: 6
Compression:
Stored size: 744 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 = stub('Kookaburra::Configuration').as_null_object foo_component_class = mock(Class) foo_component_class.should_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) component_container.foo.should == :a_foo_component end end end
Version data entries
6 entries across 6 versions & 1 rubygems