Last active
December 20, 2015 16:09
-
-
Save threez/6159543 to your computer and use it in GitHub Desktop.
Simple rspec prototype on how to test exim with rspec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'Exim Config' do | |
let!(:exim) { exim_server(config) } | |
context 'simple config' do | |
let!(:relay) { mail_server(:y) } | |
let(:config) { exim_config(:simple) } | |
let(:mail_x) { mail_fixture(:mail_x) } | |
it 'should deliver mail x to other mail server y' do | |
exim.send_mail mail_x | |
relay.should have_received(mail_x) | |
mail_x.should be_dropped_by(:rule2) | |
end | |
it 'should deliver mail x to other mail server y' do | |
exim.send_mail mail_c | |
relay.has_not_received mail_c | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment