Methods
- S
- T
Instance Public methods
Source: show
# File rails/actionwebservice/test/test_invoke_test.rb, line 53 def setup @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new end
Source: show
# File rails/actionwebservice/test/test_invoke_test.rb, line 66 def test_delegated_add @controller = TestInvokeDelegatedController.new assert_equal nil, @controller.web_service_object(:service).invoked result = invoke_delegated :service, :add, 100, 50 assert_equal 150, result assert_equal true, @controller.web_service_object(:service).invoked end
Source: show
# File rails/actionwebservice/test/test_invoke_test.rb, line 97 def test_delegated_fail_with_wrong_number_of_arguments @controller = TestInvokeDelegatedController.new assert_raise(ArgumentError) { invoke_delegated :service, :add, 1 } end
Source: show
# File rails/actionwebservice/test/test_invoke_test.rb, line 58 def test_direct_add @controller = TestInvokeDirectController.new assert_equal nil, @controller.invoked result = invoke :add, 25, 25 assert_equal 50, result assert_equal true, @controller.invoked end
Source: show
# File rails/actionwebservice/test/test_invoke_test.rb, line 102 def test_direct_fail_with_wrong_number_of_arguments @controller = TestInvokeDirectController.new assert_raise(ArgumentError) { invoke :add, 1 } end
Source: show
# File rails/actionwebservice/test/test_invoke_test.rb, line 74 def test_layered_add [:soap, :xmlrpc].each do |protocol| @protocol = protocol [:one, :two].each do |service| @controller = TestInvokeLayeredController.new assert_equal nil, @controller.web_service_object(service).invoked result = invoke_layered service, :add, 200, -50 assert_equal 150, result assert_equal true, @controller.web_service_object(service).invoked end end end
Source: show
# File rails/actionwebservice/test/test_invoke_test.rb, line 87 def test_layered_fail_with_wrong_number_of_arguments [:soap, :xmlrpc].each do |protocol| @protocol = protocol [:one, :two].each do |service| @controller = TestInvokeLayeredController.new assert_raise(ArgumentError) { invoke_layered service, :add, 1 } end end end
Source: show
# File rails/actionwebservice/test/test_invoke_test.rb, line 107 def test_with_no_parameters_declared @controller = TestInvokeDirectController.new assert_nil invoke(:null) end