Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧪 Add experimental new FakeServer for tests #157

Merged
merged 2 commits into from
Jul 17, 2023

Commits on Jul 17, 2023

  1. 🧪 Add new FakeServer for tests

    This was written for several reasons:
    * To improve `yields_in_test_server_thread` and clean up tests using it
    * To support new tests for the new cached capabilities methods
    * Because I kept messing up `OpenSSL::SSL::SSLSocket#accept`, even
      though I copied and pasted from `imaps_test` and `starttls_test`. 😳
    * To support testing of other libraries and applications that use
      Net::IMAP.
    
    I will (probably) eventually update most of the tests in `test_imap.rb`
    to use FakeServer.  The version here is able to support the capabilities
    tests and several more existing tests.  See the rdoc on FakeServer for
    more info.
    nevans committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    92ac47e View commit details
    Browse the repository at this point in the history
  2. ♻️ Update many existing tests to use FakeServer

    * test_clear_responses
    * test_close
    * test_enable
    * test_responses
    * test_uid_expunge
    * test_uidplus_responses
    * test_unselect
    
    All of the tests that used `yields_in_test_server_thread` were updated,
    so that method was deleted too.
    nevans committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    5de17fb View commit details
    Browse the repository at this point in the history