spec/unit/configuration/asker_spec.rb in imap-backup-1.0.10 vs spec/unit/configuration/asker_spec.rb in imap-backup-1.0.11

- old
+ new

@@ -43,21 +43,29 @@ end end end context '#initialize' do - its(:highline) { should eq(highline) } + it 'requires 1 parameter' do + expect do + described_class.new + end.to raise_error(ArgumentError, /0 for 1/) + end + + it 'expects a higline' do + expect(subject.highline).to eq(highline) + end end context '#email' do let(:email) { 'email@example.com' } let(:answer) { email } before do @result = subject.email end - it 'asks for an email' do + it 'asks for an email' do expect(highline).to have_received(:ask).with(/email/) end it 'returns the address' do expect(@result).to eq(email)