spec/ditty/emails/base_spec.rb in ditty-0.9.1 vs spec/ditty/emails/base_spec.rb in ditty-0.10.1

- old
+ new

@@ -9,11 +9,11 @@ mail = Mail.new allow(mail).to receive(:deliver!) mail end - context '.new' do + describe '.new' do it 'defaults to base options' do expect(subject.options).to include subject: '(No Subject)', from: 'no-reply@ditty.io', view: :base end it 'allows the use of layouts' do @@ -22,11 +22,11 @@ expect(mail).to receive(:body).with(/^<!DOCTYPE html>/m) base.deliver!('test@email.com') end end - context '.deliver!' do + describe '.deliver!' do it 'delivers the email to the specified email address' do expect(mail).to receive(:to).with('test@email.com') expect(mail).to receive(:deliver!) described_class.deliver!('test@email.com', mail: mail) end @@ -42,10 +42,10 @@ expect(mail).to receive(:from).with('from@test.com') described_class.deliver!('test@email.com', subject: 'test subject', from: 'from@test.com', mail: mail) end end - context '#deliver!' do + describe '#deliver!' do it 'delivers the email to the specified email address' do expect(mail).to receive(:to).with('test2@email.com') base = described_class.new(mail: mail) base.deliver!('test2@email.com') end