Class: Drunit::RemoteTest

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

Defined Under Namespace

Classes: TestCase

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#last_assertion_countObject (readonly)

Returns the value of attribute last_assertion_count.



12
13
14
# File 'lib/drunit/remote_test.rb', line 12

def last_assertion_count
  @last_assertion_count
end

Instance Method Details

#eval(code, source_file, source_line, method_name, *args) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/drunit/remote_test.rb', line 33

def eval(code, source_file, source_line, method_name, *args)
  test_case = TestCase.new(code, source_file, source_line, method_name)
  return rewrite_exceptions{ test_case.run(*args) }
rescue Exception => e
  return e
ensure
  @last_assertion_count = defined?(test_case.assertion_count) ? test_case.assertion_count : 0
end