spec/lib/magicka/method_builder_spec.rb in magicka-0.1.0 vs spec/lib/magicka/method_builder_spec.rb in magicka-0.2.0

- old
+ new

@@ -23,6 +23,24 @@ it 'returns the defined template when method is called' do expect(instance.template).to eq(template) end end end + + describe '#add_template_folder' do + let(:folder) { 'path_to_template_folder' } + + it do + expect { builder.add_template_folder(folder) } + .to add_method(:template_folder) + .to(klass) + end + + context 'when method is build as requested' do + before { builder.add_template_folder(folder) } + + it 'returns the defined template folder when method is called' do + expect(instance.template_folder).to eq(folder) + end + end + end end