test/eno_test.rb in openwferu-0.9.10.653 vs test/eno_test.rb in openwferu-0.9.11
- old
+ new
@@ -28,42 +28,39 @@
#
# Test 0
#
class TestDefinition0 < ProcessDefinition
- def make
- process_definition :name => "eno", :revision => "0" do
- email_notification_participant
- end
- end
+ email_notification_participant
end
def test_eno
puts " TARGET is #{ENV['TARGET']}"
engine = Engine.new
- eno = EmailNotificationParticipant.new(
- "mail.google.com",
- 25,
- "eno@outoftheblue.co.jp") do | fexp, part, wi |
+ eno = MailParticipant.new(
+ :smtp_server => "mail.google.com"
+ :from_address => "eno@outoftheblue.co.jp"
+ ) do
s = ""
-
s << "Subject: test 0\n\n"
- s << "konnichiwa.\n\n"
+ s << "konnichiwa. #{Time.now.to_s}\n\n"
- return s
+ s
end
engine.register_participant("email_notification_participant", eno)
li = LaunchItem.new(TestDefinition0)
li.email_target = ENV["TARGET"]
- engine.launch(li)
+ fei = engine.launch(li)
+
+ engine.wait_for fei
end
end