Skip to content

Commit

Permalink
Fixed support for "Stop Remote Server" keyword expected to be present…
Browse files Browse the repository at this point in the history
… for Remote libraries
  • Loading branch information
cprinos committed Nov 22, 2011
1 parent f3db760 commit bf15cff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/robot_remote_server.rb
Expand Up @@ -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'
Expand Down Expand Up @@ -129,4 +133,4 @@ def restore_stdout
return @output
end

end
end

0 comments on commit bf15cff

Please sign in to comment.