Created
March 3, 2014 20:12
-
-
Save cored/9333605 to your computer and use it in GitHub Desktop.
This file contains 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_relative '../../lib/attachment_timeout_increaser' | |
require 'minitest/autorun' | |
class AttachmentTimeoutIncreaserTest < MiniTest::Unit::TestCase | |
def setup | |
@timeout = 300 | |
@imap_connection = MiniTest::Mock.new | |
end | |
def @imap_connection.timeout | |
0 | |
end | |
def test_increase_if_timeout_less_than_300 | |
@imap_connection.expect :timeout=, true, [@timeout] | |
@imap_connection.stub :timeout, 100 do | |
AttachmentTimeoutIncreaser.increase(@imap_connection) | |
@imap_connection.verify | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment