test/helper.rb in remailer-0.7.1.2 vs test/helper.rb in remailer-0.9.1
- old
+ new
@@ -8,11 +8,10 @@
$LOAD_PATH.unshift(File.expand_path('../lib', File.dirname(__FILE__)))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'timeout'
-require 'thwait'
require 'rubygems'
begin
require 'eventmachine'
rescue => e
@@ -39,12 +38,10 @@
end
module TestTriggerHelper
def self.included(base)
base.class_eval do
- attr_reader :triggered
-
def triggered
@triggered ||= Hash.new(false)
end
def trigger(action, value = true)
@@ -136,15 +133,15 @@
end
end
end
def assert_mapping(map, &block)
- result_map = map.inject({ }) do |h, (k,v)|
+ result_map = map.inject({ }) do |h, (k, _v)|
h[k] = yield(k)
h
end
- differences = result_map.inject([ ]) do |a, (k,v)|
+ differences = result_map.inject([ ]) do |a, (k, v)|
if (v != map[k])
a << k
end
a