Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

FibberMailman lie to you when you ask for a Net::POP3.start call.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 doc
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 MIT-LICENSE.txt
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 fibber_mailman.gemspec
README.rdoc

FibberMailman

Hey Mailmal.. lie to me!

Very simple library for mocking a

Net::POP3.start( ... ) do |pop|
  <any code here>
end

call

Install

$ [sudo] gem install fibber_mailman

or

$ script/plugin install git://github.com/fguillen/FibberMailman.git

Usage

require 'fibber_mailman'

raw_mails = [
  File.read( "/fixtures/mail1.raw_mail" ) ),
  File.read( "/fixtures/mail2.raw_mail" ) ),
]

FibberMailman.lie_to_me( raw_mails ) do
  <your code that uses the Net::POP3.start on any point>
end

Not any real POP call will be done.

The mock will simulate that the mails received was the fake raw_mails.

See the test folder.

TODO

Only

pop.each_mail do |m|
  <code here>
end

is supported.

Special Thanks

Credits

Author

Fernando Guillen: fernandoguillen.info

Copyright

Copyright © 2010 Fernando Guillen

License

Released under the MIT license.

Something went wrong with that request. Please try again.