Class: Drunit::RemoteApp

Inherits:
Object
  • Object
show all
Defined in:
lib/drunit/remote_app.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, boot = nil) ⇒ RemoteApp

Returns a new instance of RemoteApp.



6
7
8
9
10
11
12
# File 'lib/drunit/remote_app.rb', line 6

def initialize(name, boot = nil)
  @name = name
  @boot = boot
  @boot ||= "#{name}/test/drunit_test_helper.rb" if File.exist? "#{name}/test/drunit_test_helper.rb"
  @boot ||= "#{name}/test/test_helper.rb" if File.exist? "#{name}/test/test_helper.rb"
  @remote_object = nil
end

Instance Method Details

#last_assertion_countObject



18
19
20
# File 'lib/drunit/remote_app.rb', line 18

def last_assertion_count
  app.last_assertion_count
end

#run(method_name, file, line, *args, &block) ⇒ Object



14
15
16
# File 'lib/drunit/remote_app.rb', line 14

def run(method_name, file, line, *args, &block)
  raise_or_return(app.eval(block_to_source(method_name, &block), file, line, method_name, *args), method_name)
end