Sha256: 60d427ef926b8ef27bc1b9a25cb210780845348084f96f5d3c6e8e1459dc6019
Contents?: true
Size: 882 Bytes
Versions: 4
Compression:
Stored size: 882 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class ServiceTest < ActiveSupport::TestCase fixtures :requests # A service that does nothing! class DummyService < Service def handle(request) return request.dispatched(self, true) end end # A preempted by service that does nothing! class PreemptedByDummyService < Service def initialize(config) @preempted_by = ["existing_service" => "DummyService"] super(config) end def handle(request) return request.dispatched(self, true) end end def setup @dummy_config = {"priority" => 1, "service_id" => "DummyService"} @umlaut_request = requests(:simple) end test "preempted by wildcard other type" do DummyService.new(@dummy_config).handle(@umlaut_request) assert(PreemptedByDummyService.new(@dummy_config).preempted_by(@umlaut_request)) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
umlaut-3.3.1 | ./test/unit/service_test.rb |
umlaut-3.3.0 | ./test/unit/service_test.rb |
umlaut-3.2.0 | ./test/unit/service_test.rb |
umlaut-3.1.1 | ./test/unit/service_test.rb |