test/test_helper.rb in resque-scheduler-2.0.0.d vs test/test_helper.rb in resque-scheduler-2.0.0.e
- old
+ new
@@ -57,15 +57,15 @@
return super unless (name = args.first) && block
require 'test/unit'
klass = Class.new(defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase) do
def self.test(name, &block)
define_method("test_#{name.gsub(/\W/,'_')}", &block) if block
- end
- def self.xtest(*args) end
- def self.setup(&block) define_method(:setup, &block) end
- def self.teardown(&block) define_method(:teardown, &block) end
- end
+ end
+ def self.xtest(*args) end
+ def self.setup(&block) define_method(:setup, &block) end
+ def self.teardown(&block) define_method(:teardown, &block) end
+ end
(class << klass; self end).send(:define_method, :name) { name.gsub(/\W/,'_') }
klass.class_eval &block
end
class SomeJob
@@ -73,6 +73,12 @@
end
end
class SomeIvarJob < SomeJob
@queue = :ivar
+end
+
+class SomeRealClass
+ def self.queue
+ :some_real_queue
+ end
end