Class: Rproof::TestRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/rproof/test_runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(reporter) ⇒ TestRunner

Returns a new instance of TestRunner.



11
12
13
14
# File 'lib/rproof/test_runner.rb', line 11

def initialize(reporter)
  raise "reporter is not an Abstract_Reporter" unless reporter.is_a? AbstractReporter
  @reporter = reporter
end

Instance Method Details

#run(test) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/rproof/test_runner.rb', line 16

def run(test)
  start_time = Time.now
  @reporter.report_campaign_begin
  results = test.execute
  end_time = Time.now
  @reporter.report_campaign_end results, start_time, end_time
end