Sha256: 68e311339f30f04c2f4ad066272bbb7c9caf965366f186816684735f9b76f9c2
Contents?: true
Size: 1.07 KB
Versions: 8
Compression:
Stored size: 1.07 KB
Contents
# # testing ruote # # Thu Dec 24 18:05:39 JST 2009 # require File.join(File.dirname(__FILE__), 'base') class FtAddServiceTest < Test::Unit::TestCase include FunctionalBase class MyService attr_reader :context, :options def initialize (context, options={}) @context = context @options = options end end def test_as_path_class @engine.add_service('toto', 'ruote', 'FtAddServiceTest::MyService') assert_equal MyService, @engine.context.toto.class end def test_as_instance @engine.add_service('toto', MyService.new(nil)) assert_equal MyService, @engine.context.toto.class end def test_as_path_class_options @engine.add_service( 'toto', 'ruote', 'FtAddServiceTest::MyService', 'colour' => 'blue') assert_equal MyService, @engine.context.toto.class assert_equal 'blue', @engine.context.toto.options['colour'] end def test_add_service_returns_service toto = @engine.add_service( 'toto', 'ruote', 'FtAddServiceTest::MyService', 'colour' => 'blue') assert_equal MyService, toto.class end end
Version data entries
8 entries across 8 versions & 1 rubygems