I just cloned the repo, tried running specs and 5 of them failing. I suspect it has something to do with me having different gems than those that were used for development.
Gems installed:
$ gem list
*** LOCAL GEMS ***
activesupport (3.0.0)
bundler (1.0.15)
fssm (0.1.4)
i18n (0.4.1)
mail (2.2.6.1)
maildir (0.6.0)
mime-types (1.16)
mocha (0.9.12)
polyglot (0.3.1)
rspec (1.3.2)
treetop (1.4.8)
The output from the spec run:
$ rake spec
rake/gempackagetask is deprecated. Use rubygems/package_task instead
Mailman::Application
- should route a message based on the from address
- should route a message based on the from and to addresses
- should route a message to a class instance method
- should route a message that doesn't match to the default block
I, [2011-06-25T19:11:12.151045 #15704] INFO -- : Mailman v0.4.0 started
D, [2011-06-25T19:11:12.151199 #15704] DEBUG -- : Processing message from STDIN.
I, [2011-06-25T19:11:12.187413 #15704] INFO -- : Got new message from '[email protected]' with subject 'NOTE: 한국말로 하는 것'.
- should accept a message from STDIN
I, [2011-06-25T19:11:12.188508 #15704] INFO -- : Mailman v0.4.0 started
I, [2011-06-25T19:11:12.188604 #15704] INFO -- : POP3 receiver enabled ([email protected]).
I, [2011-06-25T19:11:12.188645 #15704] INFO -- : Polling disabled. Checking for messages once.
I, [2011-06-25T19:11:12.193019 #15704] INFO -- : Got new message from '[email protected]' with subject 'Hello!'.
I, [2011-06-25T19:11:12.197488 #15704] INFO -- : Got new message from '[email protected]' with subject 'Hello!'.
- should poll a POP3 server, and process messsages
I, [2011-06-25T19:11:12.229383 #15704] INFO -- : Mailman v0.4.0 started
I, [2011-06-25T19:11:12.229719 #15704] INFO -- : POP3 receiver enabled ([email protected]).
I, [2011-06-25T19:11:12.229770 #15704] INFO -- : Polling disabled. Checking for messages once.
- should handle connection errors and log them to logger.error
I, [2011-06-25T19:11:12.232898 #15704] INFO -- : Mailman v0.4.0 started
Warning: Unable to load CarbonCore. FSEvents will be unavailable.
I, [2011-06-25T19:11:12.304662 #15704] INFO -- : Maildir receiver enabled (/Users/arikfr/dev/Ruby/mailman_test/spec/test-maildir).
D, [2011-06-25T19:11:12.305094 #15704] DEBUG -- : Processing new message queue...
I, [2011-06-25T19:11:12.314171 #15704] INFO -- : Got new message from '[email protected]' with subject 'Saying Hello'.
D, [2011-06-25T19:11:12.314655 #15704] DEBUG -- : Monitoring the Maildir for new messages...
I, [2011-06-25T19:11:13.824843 #15704] INFO -- : Got new message from '[email protected]' with subject 'Saying Hello'.
- should watch a maildir folder for messages
- should match a multipart endocoded body
Mailman::Application (when config.ignore_stdin)
I, [2011-06-25T19:11:13.845207 #15704] INFO -- : Mailman v0.4.0 started
- should not accept a message from STDIN
Mailman::Application instance variables
- should initialize and store the router
- should initialize and store the message processor
Mailman::Configuration
- should have a default logger
- should store a custom logger
- should store the POP3 config hash
- should have a default poll interval
- should store the poll interval
- should store the maildir location
- should have a default rails root
- should store a custom rails root
- should default to not ignoring stdin
- should store ignore_stdin setting
Mailman::MessageProcessor
- should process an message and pass it to the router (FAILED - 1)
Mailman::Receiver::POP3 connection
- should connect to a POP3 server (FAILED - 2)
- should disconnect from a POP3 server (FAILED - 3)
Mailman::Receiver::POP3 message reception
- should get messages and process them (FAILED - 4)
- should delete the messages after processing (FAILED - 5)
Mailman::Route::Condition
- should have base methods to override
- should store the matcher
- should define condition methods on Route
Mailman::Route::ToCondition
- should match an address
- should not match a non-matching address
- should not match a nil address
- should define a method on Route that is chainable and stores the condition
Mailman::Route::FromCondition
- should match an address
- should not match a non-matching address
- should define a method on Route that is chainable and stores the condition
Mailman::Route::SubjectCondition
- should match the subject
- should not match a non-matching subject
- should define a method on Route that is chainable and stores the condition
Mailman::Route::BodyCondition
- should match the body
- should not match a non-matching body
- should define a method on Route that is chainable and stores the condition
Mailman::Route::CcCondition
- should match an address
- should not match a non-matching address
- should not match a nil address
- should define a method on Route that is chainable and stores the condition
Mailman::Route::Matcher
- should have base methods to override
- should store the pattern
- should call #compile! when initialized
Mailman::Route::Matcher singleton
- should have an array of registered matchers
- should be able to find and create a matcher instance
Mailman::Route::RegexpMatcher
- should be registered with Matcher
Mailman::Route::RegexpMatcher basic
- should store a pattern
- should match a string
- should not match a non-matching string
Mailman::Route::RegexpMatcher captures
- should return a captures hash and array with matches
- should return empty capture arrays if there were no captures
Mailman::Route::StringMatcher
- should be registered with Matcher
Mailman::Route::StringMatcher compiler
- should compile to a regular expression
- should turn tokens into keys
Mailman::Route::StringMatcher matcher
- should return a hash of named params and an array of captures
- should return empty results if there are no captures
- should match a complex string
- should capture a partial string
- should not match a non-matching string
- should match named params split by a period
- should match a pattern with special characters in it
Mailman::Route
- should match a condition
- should match multiple conditions
- should not match a non-matching condition
- should not match if one condition is non-matching
Mailman::Router
Mailman::Router routing
- should set the params helper to a indifferent hash
Mailman::Router routing blocks
- should work without args
- should work with args
Mailman::Router routing class instance methods
- should route to the default method
- should route to the specified method
Mailman::Router routing array
- should loop through routes and find the first route that matches
- should run the first route that matches with two matching routes
Mailman::Router routing bounces
- should run the bounce block if it exists
- should not run the bounce block if the message did not bounce
Mailman::Router routing default
- should run the default block if it exists and no routes match
- should not run the default block if a route matched
Mocha::ExpectationError in 'Mailman::MessageProcessor should process an message and pass it to the router'
unexpected invocation: #<Mock:Message Router>.should_receive(:route)
spec/mailman/message_processor_spec.rb:15:in block (2 levels) in <top (required)>' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:40:in
instance_eval'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:40:in block in execute' /Users/arikfr/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in
timeout'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:37:in execute' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:219:in
block in run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in
run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:103:in run' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:23:in
block in run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/options.rb:153:in run_examples' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/bin/spec:5:in `
'
Mocha::ExpectationError in 'Mailman::Receiver::POP3 connection should connect to a POP3 server'
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:Message Processor>.process(any_parameters)
spec/mailman/receiver/pop3_spec.rb:6:in block (2 levels) in <top (required)>' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:74:in
instance_eval'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:74:in block in eval_each_fail_fast' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:74:in
each'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:74:in eval_each_fail_fast' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_hierarchy.rb:17:in
run_before_each'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:107:in run_before_each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:128:in
before_each_example'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:39:in block in execute' /Users/arikfr/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in
timeout'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:37:in execute' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:219:in
block in run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in
run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:103:in run' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:23:in
block in run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/options.rb:153:in run_examples' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/bin/spec:5:in `
'
Mocha::ExpectationError in 'Mailman::Receiver::POP3 connection should disconnect from a POP3 server'
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:Message Processor>.process(any_parameters)
spec/mailman/receiver/pop3_spec.rb:6:in block (2 levels) in <top (required)>' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:74:in
instance_eval'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:74:in block in eval_each_fail_fast' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:74:in
each'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:74:in eval_each_fail_fast' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_hierarchy.rb:17:in
run_before_each'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:107:in run_before_each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:128:in
before_each_example'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:39:in block in execute' /Users/arikfr/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in
timeout'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:37:in execute' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:219:in
block in run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in
run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:103:in run' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:23:in
block in run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/options.rb:153:in run_examples' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/bin/spec:5:in `
'
Mocha::ExpectationError in 'Mailman::Receiver::POP3 message reception should get messages and process them'
unexpected invocation: #<Mock:Message Processor>.should_receive(:process)
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:Message Processor>.process(any_parameters)
spec/mailman/receiver/pop3_spec.rb:33:in block (3 levels) in <top (required)>' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:40:in
instance_eval'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:40:in block in execute' /Users/arikfr/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in
timeout'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:37:in execute' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:219:in
block in run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in
run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:103:in run' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:23:in
block in run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in each' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/options.rb:153:in run_examples' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/bin/spec:5:in `
'
Mocha::ExpectationError in 'Mailman::Receiver::POP3 message reception should delete the messages after processing'
unexpected invocation: #<Mock:Message Processor>.process('To: [email protected]\r\nFrom: [email protected]\r\nSubject: Hello!\r\n\r\nemail message\r\ntest1')
unsatisfied expectations:
- expected exactly once, invoked twice: #<Mock:Message Processor>.process(any_parameters)
/Users/arikfr/dev/Ruby/mailman_test/lib/mailman/receiver/pop3.rb:41:in block in get_messages' /Users/arikfr/dev/Ruby/mailman_test/spec/pop3_mock.rb:38:in
block in each_mail'
/Users/arikfr/dev/Ruby/mailman_test/spec/pop3_mock.rb:37:in each' /Users/arikfr/dev/Ruby/mailman_test/spec/pop3_mock.rb:37:in
each_mail'
/Users/arikfr/dev/Ruby/mailman_test/lib/mailman/receiver/pop3.rb:40:in get_messages' spec/mailman/receiver/pop3_spec.rb:38:in
block (3 levels) in <top (required)>'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:40:in instance_eval' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:40:in
block in execute'
/Users/arikfr/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in timeout' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_methods.rb:37:in
execute'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:219:in block in run_examples' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in
each'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:217:in run_examples' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/example/example_group_methods.rb:103:in
run'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:23:in block in run' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in
each'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:22:in run' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/options.rb:153:in
run_examples'
/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in run' /Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/bin/spec:5:in
'
Finished in 1.872293 seconds
84 examples, 5 failures
rake aborted!
Command /Users/arikfr/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -I"lib:lib:spec" "/Users/arikfr/.rvm/gems/ruby-1.9.2-p180@mailman/gems/rspec-1.3.2/bin/spec" "spec/functional/application_spec.rb" "spec/mailman/application_spec.rb" "spec/mailman/configuration_spec.rb" "spec/mailman/message_processor_spec.rb" "spec/mailman/receiver/pop3_spec.rb" "spec/mailman/route/condition_spec.rb" "spec/mailman/route/conditions_spec.rb" "spec/mailman/route/matcher_spec.rb" "spec/mailman/route/regexp_matcher_spec.rb" "spec/mailman/route/string_matcher_spec.rb" "spec/mailman/route_spec.rb" "spec/mailman/router_spec.rb" failed
Tasks: TOP => spec
(See full trace by running task with --trace)