From e7a29380292902eae4799b2658507b3cfffb9cec Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 18 Feb 2005 10:35:25 +0000 Subject: Added Action Service to the repository git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionservice/test/base_test.rb | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 actionservice/test/base_test.rb (limited to 'actionservice/test/base_test.rb') diff --git a/actionservice/test/base_test.rb b/actionservice/test/base_test.rb new file mode 100644 index 0000000000..21456f6c5a --- /dev/null +++ b/actionservice/test/base_test.rb @@ -0,0 +1,42 @@ +require File.dirname(__FILE__) + '/abstract_unit' + +module BaseTest + class API < ActionService::API::Base + api_method :add, :expects => [:int, :int], :returns => [:int] + api_method :void + end + + class PristineAPI < ActionService::API::Base + inflect_names false + + api_method :add + api_method :under_score + end + + class Service < ActionService::Base + service_api API + + def add(a, b) + end + + def void + end + end + + class PristineService < ActionService::Base + service_api PristineAPI + + def add + end + + def under_score + end + end +end + +class TC_Base < Test::Unit::TestCase + def test_options + assert(BaseTest::PristineService.service_api.inflect_names == false) + assert(BaseTest::Service.service_api.inflect_names == true) + end +end -- cgit v1.2.3