Skip to content

Commit

Permalink
r992@aerogel: dagbrown | 2007-02-12 12:29:41 +0900
Browse files Browse the repository at this point in the history
 Added extra bits to fiddle with message verification status.  Now all I
 need to do is add the tests for that!
  • Loading branch information
dagbrown committed Feb 12, 2007
1 parent 684922e commit aef052c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/test_percolate_responder.rb
Expand Up @@ -5,13 +5,14 @@
require "percolate/responder"

class MyResponder < Percolate::Responder
attr_writer :sender_validation, :recipient_validation
attr_writer :sender_validation, :recipient_validation, :message_validation

Responses = { false => "no", true => "ok" }

def initialize(hostname,opts={})
@sender_validation = true
@recipient_validation = true
@message_validation = true
super(hostname, opts)
end

Expand All @@ -22,6 +23,14 @@ def validate_sender addr
def validate_recipient addr
return @recipient_validation, Responses[@recipient_validation]
end

def process_message addr
if @message_validation
return true
else
return false
end
end
end

class TestPercolateResponder < Test::Unit::TestCase
Expand Down

0 comments on commit aef052c

Please sign in to comment.