Module: Drunit::RemoteTest::TestCaseModule

Defined in:
lib/drunit/remote_test.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(other) ⇒ Object



14
15
16
17
18
19
# File 'lib/drunit/remote_test.rb', line 14

def self.included(other)
  other.send(:class_eval) do
    include DRb::DRbUndumped
    attr_reader :assertion_count
  end
end

Instance Method Details

#add_assertionObject



25
26
27
# File 'lib/drunit/remote_test.rb', line 25

def add_assertion
  @assertion_count += 1
end

#define(code, source_file, source_line) ⇒ Object



29
30
31
# File 'lib/drunit/remote_test.rb', line 29

def define(code, source_file, source_line)
  instance_eval(code, source_file, source_line)
end

#initializeObject



21
22
23
# File 'lib/drunit/remote_test.rb', line 21

def initialize
  @assertion_count = 0
end

#run(method_name, *args) ⇒ Object



33
34
35
36
# File 'lib/drunit/remote_test.rb', line 33

def run(method_name, *args)
  @assertion_count = 0
  rewrite_exceptions{ __send__(method_name, *args) }
end