Permalink
Browse files

Fixed support for "Stop Remote Server" keyword expected to be present…

… for Remote libraries
  • Loading branch information...
1 parent f3db760 commit bf15cff05f5093ee350818ed56b54f6cb69b8308 @cprinos committed Nov 22, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/robot_remote_server.rb
View
10 lib/robot_remote_server.rb
@@ -50,15 +50,19 @@ def initialize(library, host='localhost', port=8270, yardoc_file = '.yardoc', ya
def get_keyword_names
# Implicit methods can't be used as keywords
- @library.methods - Object.new.methods
+ @library.methods - Object.new.methods + [:stop_remote_server]
end
def run_keyword(name, args)
intercept_stdout()
result = {:status=>'PASS', :return=>'', :output=>'',
:error=>'', :traceback=>''}
begin
- return_value = @library.send(name, *args)
+ if name == 'stop_remote_server'
+ shutdown
+ else
+ return_value = @library.send(name, *args)
+ end
result[:return] = handle_return_value(return_value)
rescue Exception => exception
result[:status] = 'FAIL'
@@ -129,4 +133,4 @@ def restore_stdout
return @output
end
-end
+end

0 comments on commit bf15cff

Please sign in to comment.