Skip to content

Instantly share code, notes, and snippets.

def check(conf, what)
if c = conf[what]
if block_given?
yield c
else
false
end
else
puts "missing: #{what}"
true
When /^I connect to smtp on (.+)$/ do |server|
@smtp = Net::SMTP.start(server, 25)
end
When /^the sender is (\S+)$/ do |from|
@from = from
end
Then /^it should accept email to (\S+)$/ do |to|
message = "a test message from cucumber-nagios"