spec/dockly/util/dsl_spec.rb in dockly-util-0.0.10 vs spec/dockly/util/dsl_spec.rb in dockly-util-0.1.0

- old
+ new

@@ -48,9 +48,17 @@ .to change { test_instance.instance_variable_get(:@chips) } .to 'bbq' end end + context 'with a block' do + it 'sets the corresponding instance variable to the block' do + expect { test_instance.chips { 'test' } } + .to change { test_instance.instance_variable_get(:@chips) } + expect(test_instance.chips.call).to eq('test') + end + end + end end describe '.dsl_class_attribute' do context 'when the sceond argument is not a DSL' do