Skip to content

Commit

Permalink
Merge pull request tpitale#145 from cablett/cablett-fix-broken-specs
Browse files Browse the repository at this point in the history
  • Loading branch information
tpitale committed Nov 23, 2022
2 parents 82ca33d + 14bb0bf commit 6beac47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion spec/lib/delivery/letter_opener_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
describe MailRoom::Delivery::LetterOpener do
describe '#deliver' do
let(:mailbox) {build_mailbox(location: '/tmp/somewhere')}
let(:delivery_method) {stub(:deliver!)}
let(:delivery_method) {stub}
let(:mail) {stub}

before :each do
Mail.stubs(:read_from_string).returns(mail)
::LetterOpener::DeliveryMethod.stubs(:new).returns(delivery_method)
delivery_method.stubs(:deliver!)
end

it 'creates a new LetterOpener::DeliveryMethod' do
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/delivery/logger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
let(:mailbox) {build_mailbox(log_path: '/var/log/mail-room.log')}

it 'creates a new file to append to' do
file = stub(:sync=)
file = stub
file.stubs(:sync=)

File.expects(:open).with('/var/log/mail-room.log', 'a').returns(file)
::Logger.stubs(:new).with(file)
Expand Down

0 comments on commit 6beac47

Please sign in to comment.